AppDirect ShoppingCart API
Operations related to shopping carts
Operations related to shopping carts
openapi: 3.0.0
info:
description: The Companies API allows developers to manage marketplace companies and their user memberships.
title: Companies AI Embed ShoppingCart API
license:
name: Apache License, Version 2.0
url: http://www.apache.org/licenses/LICENSE-2.0
version: v296.0-SNAPSHOT
servers:
- url: https://marketplace.appdirect.com/api
- url: https://virtserver.swaggerhub.com
tags:
- name: ShoppingCart
description: Operations related to shopping carts
x-displayName: ShoppingCart
paths:
/v3/checkout/shoppingCarts:
get:
tags:
- ShoppingCart
x-appdirect-api-stage: Early Access
x-appdirect-visible: false
summary: List shopping carts
description: Returns all ACTIVE and FINISHED shopping carts
operationId: listShoppingCarts
parameters:
- in: query
name: buyerUserId
description: Buyer user ID
schema:
type: string
- in: query
name: buyerCompanyId
description: Buyer user company ID
schema:
type: string
- in: query
name: ownerUserId
description: Owner user ID
schema:
type: string
- in: query
name: ownerCompanyId
description: Owner company ID
schema:
type: string
- in: query
name: productId
description: Product ID
schema:
type: string
- in: query
name: status
description: Shopping cart status
style: form
explode: false
schema:
type: array
items:
type: string
- in: query
name: partner
description: Shopping cart partner (This field is not public to client)
schema:
type: string
- in: query
name: number
description: 1-based page index
schema:
type: integer
default: 1
- in: query
name: size
description: The number of results per page to return
schema:
type: integer
default: 10
- in: query
name: sortField
description: Sort field
schema:
type: string
default: createdOn
- in: query
name: sortOrder
description: Sort order.
schema:
type: string
enum:
- ASC
- DESC
default: ASC
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PagedResources'
examples:
response:
value:
content:
- id: 5bda35f8dd54f108b898c777
createdOn: '1541027320333'
ownerUserId: 01ada338-52fb-42b8-8c47-c72c30b8a602
ownerCompanyId: 08a28380-b2cf-4915-aaf8-2958b350b090
buyerType: CUSTOMER
currency: USD
status: ACTIVE
buyerUserId: 01ada338-52fb-42b8-8c47-c72c30b8a602
buyerCompanyId: 08a28380-b2cf-4915-aaf8-2958b350b090
items:
- id: 0129ddf5-4977-4f20-b42a-c41d47b00e2a
pricingPlanId: d0495026-dcab-45fe-858a-757491e93121
units: []
- id: 5bda370cdd54f10bccf03ba2
createdOn: '1541027596771'
ownerUserId: 01ada338-52fb-42b8-8c47-c72c30b8a602
ownerCompanyId: 08a28380-b2cf-4915-aaf8-2958b350b090
buyerType: CUSTOMER
currency: USD
status: ACTIVE
buyerUserId: 01ada338-52fb-42b8-8c47-c72c30b8a602
buyerCompanyId: 08a28380-b2cf-4915-aaf8-2958b350b090
items:
- id: 12815d48-b7e6-41c7-804f-252bf64ad411
pricingPlanId: f1257109-8c81-402e-a61f-147fea66ab91
units: []
- id: 5bda373fdd54f10bccf03ba3
createdOn: '1541027647666'
ownerUserId: 01ada338-52fb-42b8-8c47-c72c30b8a602
ownerCompanyId: 08a28380-b2cf-4915-aaf8-2958b350b090
buyerType: CUSTOMER
currency: USD
status: ACTIVE
buyerUserId: 01ada338-52fb-42b8-8c47-c72c30b8a602
buyerCompanyId: 08a28380-b2cf-4915-aaf8-2958b350b090
items:
- id: abada11b-977e-4466-834a-6b2b45e0266f
pricingPlanId: 46f442b8-e3c0-4e9a-ba7d-d062058bac25
units: []
page:
size: 3
totalElements: 188
totalPages: 10
number: 10
'401':
description: NOT AUTHORIZED
x-codeSamples:
- lang: Shell + Curl
source: "curl --request GET \\\n --url 'https://marketplace.appdirect.com/api/v3/checkout/shoppingCarts?buyerUserId=SOME_STRING_VALUE&buyerCompanyId=SOME_STRING_VALUE&ownerUserId=SOME_STRING_VALUE&ownerCompanyId=SOME_STRING_VALUE&productId=SOME_STRING_VALUE&status=SOME_ARRAY_VALUE&partner=SOME_STRING_VALUE&number=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&sortField=SOME_STRING_VALUE&sortOrder=SOME_STRING_VALUE'"
- lang: Node + Request
source: "const request = require('request');\n\nconst options = {\n method: 'GET',\n url: 'https://marketplace.appdirect.com/api/v3/checkout/shoppingCarts',\n qs: {\n buyerUserId: 'SOME_STRING_VALUE',\n buyerCompanyId: 'SOME_STRING_VALUE',\n ownerUserId: 'SOME_STRING_VALUE',\n ownerCompanyId: 'SOME_STRING_VALUE',\n productId: 'SOME_STRING_VALUE',\n status: 'SOME_ARRAY_VALUE',\n partner: 'SOME_STRING_VALUE',\n number: 'SOME_INTEGER_VALUE',\n size: 'SOME_INTEGER_VALUE',\n sortField: 'SOME_STRING_VALUE',\n sortOrder: 'SOME_STRING_VALUE'\n }\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"
- lang: Java + Okhttp
source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://marketplace.appdirect.com/api/v3/checkout/shoppingCarts?buyerUserId=SOME_STRING_VALUE&buyerCompanyId=SOME_STRING_VALUE&ownerUserId=SOME_STRING_VALUE&ownerCompanyId=SOME_STRING_VALUE&productId=SOME_STRING_VALUE&status=SOME_ARRAY_VALUE&partner=SOME_STRING_VALUE&number=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&sortField=SOME_STRING_VALUE&sortOrder=SOME_STRING_VALUE\")\n .get()\n .build();\n\nResponse response = client.newCall(request).execute();"
post:
tags:
- ShoppingCart
x-appdirect-api-stage: Early Access
x-appdirect-visible: false
summary: Create shopping carts
operationId: createShoppingCart
parameters:
- in: header
name: AD-ShoppingCart-Partner
description: The partner code of a marketplace
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ShoppingCart'
description: ShoppingCartWS
required: true
description: Creates a shopping cart
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ShoppingCart'
examples:
response:
value:
ownerUserId: 01ada338-52fb-42b8-8c47-c72c30b8a602
ownerCompanyId: 08a28380-b2cf-4915-aaf8-2958b350b090
buyerType: CUSTOMER
currency: USD
buyerUserId: 01ada338-52fb-42b8-8c47-c72c30b8a602
buyerCompanyId: 08a28380-b2cf-4915-aaf8-2958b350b090
items:
- pricingPlanId: d0495026-dcab-45fe-858a-757491e93121
units:
- quantity: '5'
unit: USERS
customPrices:
- costId: 63e20fed-f340-11e8-8fb5-125b89b63428
priceType: MARKETPLACE_RESELLER_PURCHASE_PRICE
pricingStrategy: FLAT
definition:
price: 9.99
- costId: 491f1e67-223a-4c2d-9508-772b545085ad
priceType: MARKETPLACE_RESELLER_PURCHASE_PRICE
pricingStrategy: TIERED
definition:
priceRanges:
- min: 1
max: 5
price: 9.99
- min: 5
max: 10
price: 6.99
- costId: 77e5badb-90f3-438d-9f3c-506a063fd6e7
priceType: MARKETPLACE_RESELLER_PURCHASE_PRICE
pricingStrategy: UNIT
definition:
priceRanges:
- min: 0
max: null
price: 1.99
'401':
description: NOT AUTHORIZED
x-codeSamples:
- lang: Shell + Curl
source: "curl --request POST \\\n --url https://marketplace.appdirect.com/api/v3/checkout/shoppingCarts \\\n --header 'AD-ShoppingCart-Partner: SOME_STRING_VALUE' \\\n --data '{\"id\":\"4f59d160-0e63-45c4-bb91-7ebe873da29f\",\"createdOn\":\"2020-10-12 07:20:50.52Z\",\"ownerUserId\":\"83407ce8-373f-11e6-ac61-9e71128cae77\",\"ownerCompanyId\":\"a411dc54-d46f-4002-ab00-3ea52e4eb118\",\"buyerType\":\"CUSTOMER\",\"currency\":\"USD\",\"status\":\"ACTIVE\",\"isBlocked\":false,\"paymentMethodId\":\"a411dc54-d46f-4002-ab00-3ea52e4eb118\",\"preAuthId\":\"a411dc54-d46f-4002-ab00-3ea52e4eb118\",\"locale\":\"en_US\",\"buyerUserId\":\"83407ce8-373f-11e6-ac61-9e71128cae77\",\"buyerCompanyId\":\"a411dc54-d46f-4002-ab00-3ea52e4eb118\",\"items\":[{\"id\":\"45ae34b7-ffc1-4d74-be78-dce34008cd2e\",\"referenceId\":\"45\",\"subscriptionId\":\"83407ce8-373f-11e6-ac61-9e71128cae77\",\"pricingPlanId\":\"3dcc468d-fd4c-41ce-b700-f88c0c74561f\",\"serviceConfiguration\":{\"date\":\"2010-10-19T00:00:00.000Z\",\"strategy\":\"CUSTOM\"},\"billingConfiguration\":{\"date\":\"1546300800000\",\"strategy\":\"CUSTOM\"},\"discountCode\":\"DISCOUNT\",\"discountId\":\"30\",\"customPrices\":[{\"costId\":\"9742e09a-e1b4-4b9e-b1a7-66df3e41cebe\",\"price\":20}],\"units\":[],\"customAttributes\":{\"vendorRequiredFields\":{\"customAttributes\":{\"preferredColours\":[\"key_red\",\"key_white\"],\"preferredTime\":\"12:00\"}},\"subscription\":{\"customAttributes\":{\"preferredColours\":[\"key_red\",\"key_white\"],\"preferredTime\":\"12:00\"}}},\"customContractConfiguration\":{\"minimumServiceLength\":1,\"minimumServiceLengthUnit\":\"MONTHLY\",\"endOfContractGracePeriod\":0,\"endOfContractGracePeriodUnit\":\"INFINITY\",\"contractCancellationPeriodLimit\":0,\"contractCancellationPeriodUnit\":\"NONE\",\"continueWithoutContract\":false,\"autoExtensionPricingId\":\"string\",\"terminationFeeGracePeriod\":0,\"terminationFeeGracePeriodUnit\":\"INFINITY\",\"blockContractUpgrades\":false,\"blockContractDowngrades\":false,\"blockSwitchToShorterContract\":false,\"keepContractDateOnPlanChange\":false,\"alignWithParentCycleStartDate\":false,\"unitTerms\":{\"property1\":{\"blockContractIncrease\":false,\"blockOriginalContractDecrease\":false,\"blockContractDecrease\":true},\"property2\":{\"blockContractIncrease\":false,\"blockOriginalContractDecrease\":false,\"blockContractDecrease\":true}},\"sourceId\":\"string\",\"terminationFee\":{\"feeType\":\"FIXED\",\"amount\":0,\"description\":\"string\"},\"contractFee\":0}}],\"customAttributes\":{\"purchase\":{\"customAttributes\":{\"preferredColours\":[\"key_red\",\"key_white\"],\"preferredTime\":\"12:00\"}},\"buyerUser\":{\"customAttributes\":{\"preferredColours\":[\"key_red\",\"key_white\"],\"preferredTime\":\"12:00\"}},\"buyerCompany\":{\"customAttributes\":{\"preferredColours\":[\"key_red\",\"key_white\"],\"preferredTime\":\"12:00\"}},\"ownerUser\":{\"customAttributes\":{\"preferredColours\":[\"key_red\",\"key_white\"],\"preferredTime\":\"12:00\"}},\"ownerCompany\":{\"customAttributes\":{\"preferredColours\":[\"key_red\",\"key_white\"],\"preferredTime\":\"12:00\"}}},\"associations\":[{\"parentItemId\":\"string\",\"childItemIds\":[\"string\"],\"type\":\"ADDON\"}],\"fees\":[{\"id\":\"ce402858-4fe8-4254-8b69-73c41142f4ba\",\"externalId\":\"a8bf31a8-fe75-4ab9-9559-dcd41eca9d12\",\"createdOn\":\"2020-10-12 07:20:50.52Z\",\"key\":\"SHIPPING_FEE_100\",\"currency\":\"USD\",\"amount\":\"9.81\",\"description\":{\"defaultDescription\":\"Some description here. Valid from {$fromDate} until {$toDate}\",\"localizedDescriptions\":\"{\\\"en_US\\\": \\\"Some description here. Valid from {$fromDate} until {$toDate}\\\", \\\"es_AR\\\": \\\"Alguna descripción acá. Válido desde {$fromDate} hasta {$toDate}\\\"}\",\"params\":\"{\\\"fromDate\\\": \\\"2019-10-12 07:20:50.52Z\\\", \\\"toDate\\\": \\\"2020-10-12 07:20:50.52Z\\\"}\"},\"revenueShare\":{\"appdirect\":\"0.00\",\"channel\":\"1.00\",\"vendor\":\"0.00\"},\"itemIds\":\"[\\\"b126e204-05f9-444a-af43-7629069eed03\\\", \\\"20de5578-a903-43da-95b8-65a3b584bc29\\\", \\\"a104ae19-d5cd-4de1-802b-5b2ec60e7fbf\\\"]\",\"metadata\":\"key1: \\\"value1\\\"\"}],\"accreditedAgents\":[{\"userId\":\"83407ce8-373f-11e6-ac61-9e71128cae77\",\"companyId\":\"a411dc54-d46f-4002-ab00-3ea52e4eb118\"}]}'"
- lang: Node + Request
source: "const request = require('request');\n\nconst options = {\n method: 'POST',\n url: 'https://marketplace.appdirect.com/api/v3/checkout/shoppingCarts',\n headers: {'AD-ShoppingCart-Partner': 'SOME_STRING_VALUE'},\n body: {\n id: '4f59d160-0e63-45c4-bb91-7ebe873da29f',\n createdOn: '2020-10-12 07:20:50.52Z',\n ownerUserId: '83407ce8-373f-11e6-ac61-9e71128cae77',\n ownerCompanyId: 'a411dc54-d46f-4002-ab00-3ea52e4eb118',\n buyerType: 'CUSTOMER',\n currency: 'USD',\n status: 'ACTIVE',\n isBlocked: false,\n paymentMethodId: 'a411dc54-d46f-4002-ab00-3ea52e4eb118',\n preAuthId: 'a411dc54-d46f-4002-ab00-3ea52e4eb118',\n locale: 'en_US',\n buyerUserId: '83407ce8-373f-11e6-ac61-9e71128cae77',\n buyerCompanyId: 'a411dc54-d46f-4002-ab00-3ea52e4eb118',\n items: [\n {\n id: '45ae34b7-ffc1-4d74-be78-dce34008cd2e',\n referenceId: '45',\n subscriptionId: '83407ce8-373f-11e6-ac61-9e71128cae77',\n pricingPlanId: '3dcc468d-fd4c-41ce-b700-f88c0c74561f',\n serviceConfiguration: {date: '2010-10-19T00:00:00.000Z', strategy: 'CUSTOM'},\n billingConfiguration: {date: '1546300800000', strategy: 'CUSTOM'},\n discountCode: 'DISCOUNT',\n discountId: '30',\n customPrices: [{costId: '9742e09a-e1b4-4b9e-b1a7-66df3e41cebe', price: 20}],\n units: [],\n customAttributes: {\n vendorRequiredFields: {\n customAttributes: {preferredColours: ['key_red', 'key_white'], preferredTime: '12:00'}\n },\n subscription: {\n customAttributes: {preferredColours: ['key_red', 'key_white'], preferredTime: '12:00'}\n }\n },\n customContractConfiguration: {\n minimumServiceLength: 1,\n minimumServiceLengthUnit: 'MONTHLY',\n endOfContractGracePeriod: 0,\n endOfContractGracePeriodUnit: 'INFINITY',\n contractCancellationPeriodLimit: 0,\n contractCancellationPeriodUnit: 'NONE',\n continueWithoutContract: false,\n autoExtensionPricingId: 'string',\n terminationFeeGracePeriod: 0,\n terminationFeeGracePeriodUnit: 'INFINITY',\n blockContractUpgrades: false,\n blockContractDowngrades: false,\n blockSwitchToShorterContract: false,\n keepContractDateOnPlanChange: false,\n alignWithParentCycleStartDate: false,\n unitTerms: {\n property1: {\n blockContractIncrease: false,\n blockOriginalContractDecrease: false,\n blockContractDecrease: true\n },\n property2: {\n blockContractIncrease: false,\n blockOriginalContractDecrease: false,\n blockContractDecrease: true\n }\n },\n sourceId: 'string',\n terminationFee: {feeType: 'FIXED', amount: 0, description: 'string'},\n contractFee: 0\n }\n }\n ],\n customAttributes: {\n purchase: {\n customAttributes: {preferredColours: ['key_red', 'key_white'], preferredTime: '12:00'}\n },\n buyerUser: {\n customAttributes: {preferredColours: ['key_red', 'key_white'], preferredTime: '12:00'}\n },\n buyerCompany: {\n customAttributes: {preferredColours: ['key_red', 'key_white'], preferredTime: '12:00'}\n },\n ownerUser: {\n customAttributes: {preferredColours: ['key_red', 'key_white'], preferredTime: '12:00'}\n },\n ownerCompany: {\n customAttributes: {preferredColours: ['key_red', 'key_white'], preferredTime: '12:00'}\n }\n },\n associations: [{parentItemId: 'string', childItemIds: ['string'], type: 'ADDON'}],\n fees: [\n {\n id: 'ce402858-4fe8-4254-8b69-73c41142f4ba',\n externalId: 'a8bf31a8-fe75-4ab9-9559-dcd41eca9d12',\n createdOn: '2020-10-12 07:20:50.52Z',\n key: 'SHIPPING_FEE_100',\n currency: 'USD',\n amount: '9.81',\n description: {\n defaultDescription: 'Some description here. Valid from {$fromDate} until {$toDate}',\n localizedDescriptions: '{\"en_US\": \"Some description here. Valid from {$fromDate} until {$toDate}\", \"es_AR\": \"Alguna descripción acá. Válido desde {$fromDate} hasta {$toDate}\"}',\n params: '{\"fromDate\": \"2019-10-12 07:20:50.52Z\", \"toDate\": \"2020-10-12 07:20:50.52Z\"}'\n },\n revenueShare: {appdirect: '0.00', channel: '1.00', vendor: '0.00'},\n itemIds: '[\"b126e204-05f9-444a-af43-7629069eed03\", \"20de5578-a903-43da-95b8-65a3b584bc29\", \"a104ae19-d5cd-4de1-802b-5b2ec60e7fbf\"]',\n metadata: 'key1: \"value1\"'\n }\n ],\n accreditedAgents: [\n {\n userId: '83407ce8-373f-11e6-ac61-9e71128cae77',\n companyId: 'a411dc54-d46f-4002-ab00-3ea52e4eb118'\n }\n ]\n },\n json: true\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"
- lang: Java + Okhttp
source: "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"id\\\":\\\"4f59d160-0e63-45c4-bb91-7ebe873da29f\\\",\\\"createdOn\\\":\\\"2020-10-12 07:20:50.52Z\\\",\\\"ownerUserId\\\":\\\"83407ce8-373f-11e6-ac61-9e71128cae77\\\",\\\"ownerCompanyId\\\":\\\"a411dc54-d46f-4002-ab00-3ea52e4eb118\\\",\\\"buyerType\\\":\\\"CUSTOMER\\\",\\\"currency\\\":\\\"USD\\\",\\\"status\\\":\\\"ACTIVE\\\",\\\"isBlocked\\\":false,\\\"paymentMethodId\\\":\\\"a411dc54-d46f-4002-ab00-3ea52e4eb118\\\",\\\"preAuthId\\\":\\\"a411dc54-d46f-4002-ab00-3ea52e4eb118\\\",\\\"locale\\\":\\\"en_US\\\",\\\"buyerUserId\\\":\\\"83407ce8-373f-11e6-ac61-9e71128cae77\\\",\\\"buyerCompanyId\\\":\\\"a411dc54-d46f-4002-ab00-3ea52e4eb118\\\",\\\"items\\\":[{\\\"id\\\":\\\"45ae34b7-ffc1-4d74-be78-dce34008cd2e\\\",\\\"referenceId\\\":\\\"45\\\",\\\"subscriptionId\\\":\\\"83407ce8-373f-11e6-ac61-9e71128cae77\\\",\\\"pricingPlanId\\\":\\\"3dcc468d-fd4c-41ce-b700-f88c0c74561f\\\",\\\"serviceConfiguration\\\":{\\\"date\\\":\\\"2010-10-19T00:00:00.000Z\\\",\\\"strategy\\\":\\\"CUSTOM\\\"},\\\"billingConfiguration\\\":{\\\"date\\\":\\\"1546300800000\\\",\\\"strategy\\\":\\\"CUSTOM\\\"},\\\"discountCode\\\":\\\"DISCOUNT\\\",\\\"discountId\\\":\\\"30\\\",\\\"customPrices\\\":[{\\\"costId\\\":\\\"9742e09a-e1b4-4b9e-b1a7-66df3e41cebe\\\",\\\"price\\\":20}],\\\"units\\\":[],\\\"customAttributes\\\":{\\\"vendorRequiredFields\\\":{\\\"customAttributes\\\":{\\\"preferredColours\\\":[\\\"key_red\\\",\\\"key_white\\\"],\\\"preferredTime\\\":\\\"12:00\\\"}},\\\"subscription\\\":{\\\"customAttributes\\\":{\\\"preferredColours\\\":[\\\"key_red\\\",\\\"key_white\\\"],\\\"preferredTime\\\":\\\"12:00\\\"}}},\\\"customContractConfiguration\\\":{\\\"minimumServiceLength\\\":1,\\\"minimumServiceLengthUnit\\\":\\\"MONTHLY\\\",\\\"endOfContractGracePeriod\\\":0,\\\"endOfContractGracePeriodUnit\\\":\\\"INFINITY\\\",\\\"contractCancellationPeriodLimit\\\":0,\\\"contractCancellationPeriodUnit\\\":\\\"NONE\\\",\\\"continueWithoutContract\\\":false,\\\"autoExtensionPricingId\\\":\\\"string\\\",\\\"terminationFeeGracePeriod\\\":0,\\\"terminationFeeGracePeriodUnit\\\":\\\"INFINITY\\\",\\\"blockContractUpgrades\\\":false,\\\"blockContractDowngrades\\\":false,\\\"blockSwitchToShorterContract\\\":false,\\\"keepContractDateOnPlanChange\\\":false,\\\"alignWithParentCycleStartDate\\\":false,\\\"unitTerms\\\":{\\\"property1\\\":{\\\"blockContractIncrease\\\":false,\\\"blockOriginalContractDecrease\\\":false,\\\"blockContractDecrease\\\":true},\\\"property2\\\":{\\\"blockContractIncrease\\\":false,\\\"blockOriginalContractDecrease\\\":false,\\\"blockContractDecrease\\\":true}},\\\"sourceId\\\":\\\"string\\\",\\\"terminationFee\\\":{\\\"feeType\\\":\\\"FIXED\\\",\\\"amount\\\":0,\\\"description\\\":\\\"string\\\"},\\\"contractFee\\\":0}}],\\\"customAttributes\\\":{\\\"purchase\\\":{\\\"customAttributes\\\":{\\\"preferredColours\\\":[\\\"key_red\\\",\\\"key_white\\\"],\\\"preferredTime\\\":\\\"12:00\\\"}},\\\"buyerUser\\\":{\\\"customAttributes\\\":{\\\"preferredColours\\\":[\\\"key_red\\\",\\\"key_white\\\"],\\\"preferredTime\\\":\\\"12:00\\\"}},\\\"buyerCompany\\\":{\\\"customAttributes\\\":{\\\"preferredColours\\\":[\\\"key_red\\\",\\\"key_white\\\"],\\\"preferredTime\\\":\\\"12:00\\\"}},\\\"ownerUser\\\":{\\\"customAttributes\\\":{\\\"preferredColours\\\":[\\\"key_red\\\",\\\"key_white\\\"],\\\"preferredTime\\\":\\\"12:00\\\"}},\\\"ownerCompany\\\":{\\\"customAttributes\\\":{\\\"preferredColours\\\":[\\\"key_red\\\",\\\"key_white\\\"],\\\"preferredTime\\\":\\\"12:00\\\"}}},\\\"associations\\\":[{\\\"parentItemId\\\":\\\"string\\\",\\\"childItemIds\\\":[\\\"string\\\"],\\\"type\\\":\\\"ADDON\\\"}],\\\"fees\\\":[{\\\"id\\\":\\\"ce402858-4fe8-4254-8b69-73c41142f4ba\\\",\\\"externalId\\\":\\\"a8bf31a8-fe75-4ab9-9559-dcd41eca9d12\\\",\\\"createdOn\\\":\\\"2020-10-12 07:20:50.52Z\\\",\\\"key\\\":\\\"SHIPPING_FEE_100\\\",\\\"currency\\\":\\\"USD\\\",\\\"amount\\\":\\\"9.81\\\",\\\"description\\\":{\\\"defaultDescription\\\":\\\"Some description here. Valid from {$fromDate} until {$toDate}\\\",\\\"localizedDescriptions\\\":\\\"{\\\\\\\"en_US\\\\\\\": \\\\\\\"Some description here. Valid from {$fromDate} until {$toDate}\\\\\\\", \\\\\\\"es_AR\\\\\\\": \\\\\\\"Alguna descripción acá. Válido desde {$fromDate} hasta {$toDate}\\\\\\\"}\\\",\\\"params\\\":\\\"{\\\\\\\"fromDate\\\\\\\": \\\\\\\"2019-10-12 07:20:50.52Z\\\\\\\", \\\\\\\"toDate\\\\\\\": \\\\\\\"2020-10-12 07:20:50.52Z\\\\\\\"}\\\"},\\\"revenueShare\\\":{\\\"appdirect\\\":\\\"0.00\\\",\\\"channel\\\":\\\"1.00\\\",\\\"vendor\\\":\\\"0.00\\\"},\\\"itemIds\\\":\\\"[\\\\\\\"b126e204-05f9-444a-af43-7629069eed03\\\\\\\", \\\\\\\"20de5578-a903-43da-95b8-65a3b584bc29\\\\\\\", \\\\\\\"a104ae19-d5cd-4de1-802b-5b2ec60e7fbf\\\\\\\"]\\\",\\\"metadata\\\":\\\"key1: \\\\\\\"value1\\\\\\\"\\\"}],\\\"accreditedAgents\\\":[{\\\"userId\\\":\\\"83407ce8-373f-11e6-ac61-9e71128cae77\\\",\\\"companyId\\\":\\\"a411dc54-d46f-4002-ab00-3ea52e4eb118\\\"}]}\");\nRequest request = new Request.Builder()\n .url(\"https://marketplace.appdirect.com/api/v3/checkout/shoppingCarts\")\n .post(body)\n .addHeader(\"AD-ShoppingCart-Partner\", \"SOME_STRING_VALUE\")\n .build();\n\nResponse response = client.newCall(request).execute();"
/v3/checkout/shoppingCarts/{shoppingCartId}:
get:
tags:
- ShoppingCart
x-appdirect-api-stage: Early Access
x-appdirect-visible: false
summary: Retrieve shopping cart
operationId: getShoppingCart
parameters:
- $ref: '#/components/parameters/shoppingCartId'
description: Retrieves the specified shopping cart
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ShoppingCart'
examples:
response:
value:
id: 5bda3aeedd54f113e3694422
createdOn: '1541028590204'
ownerUserId: 01ada338-52fb-42b8-8c47-c72c30b8a602
ownerCompanyId: 08a28380-b2cf-4915-aaf8-2958b350b090
buyerUserId: 01ada338-52fb-42b8-8c47-c72c30b8a602
buyerCompanyId: 08a28380-b2cf-4915-aaf8-2958b350b090
buyerType: CUSTOMER
currency: USD
status: ACTIVE
items:
- id: 38ffe338-aaf0-4422-b419-61372ba4ecec
pricingPlanId: d0495026-dcab-45fe-858a-757491e93121
customAttributes:
purchase:
preferredTime: '10:00'
'401':
description: NOT AUTHORIZED
x-codeSamples:
- lang: Shell + Curl
source: "curl --request GET \\\n --url https://marketplace.appdirect.com/api/v3/checkout/shoppingCarts/%7BshoppingCartId%7D"
- lang: Node + Request
source: "const request = require('request');\n\nconst options = {\n method: 'GET',\n url: 'https://marketplace.appdirect.com/api/v3/checkout/shoppingCarts/%7BshoppingCartId%7D'\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"
- lang: Java + Okhttp
source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://marketplace.appdirect.com/api/v3/checkout/shoppingCarts/%7BshoppingCartId%7D\")\n .get()\n .build();\n\nResponse response = client.newCall(request).execute();"
delete:
tags:
- ShoppingCart
x-appdirect-api-stage: Early Access
x-appdirect-visible: false
summary: Delete shopping carts
operationId: deleteShoppingCart
parameters:
- $ref: '#/components/parameters/shoppingCartId'
description: Deletes the specified shopping cart
responses:
'204':
description: NO CONTENT
'401':
description: NOT AUTHORIZED
x-codeSamples:
- lang: Shell + Curl
source: "curl --request DELETE \\\n --url https://marketplace.appdirect.com/api/v3/checkout/shoppingCarts/%7BshoppingCartId%7D"
- lang: Node + Request
source: "const request = require('request');\n\nconst options = {\n method: 'DELETE',\n url: 'https://marketplace.appdirect.com/api/v3/checkout/shoppingCarts/%7BshoppingCartId%7D'\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"
- lang: Java + Okhttp
source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://marketplace.appdirect.com/api/v3/checkout/shoppingCarts/%7BshoppingCartId%7D\")\n .delete(null)\n .build();\n\nResponse response = client.newCall(request).execute();"
patch:
tags:
- ShoppingCart
x-appdirect-api-stage: Early Access
x-appdirect-visible: false
summary: Update shopping carts
operationId: updateShoppingCart
parameters:
- $ref: '#/components/parameters/shoppingCartId'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ShoppingCart'
description: ShoppingCartWS
required: true
description: Updates the specified shopping cart
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ShoppingCart'
examples:
response:
value:
id: 5be20b01411e037ed1e5dbd5
createdOn: '1541540609246'
ownerUserId: 01ada338-52fb-42b8-8c47-c72c30b8a602
ownerCompanyId: 08a28380-b2cf-4915-aaf8-2958b350b090
buyerUserId: 01ada338-52fb-42b8-8c47-c72c30b8a602
buyerCompanyId: 08a28380-b2cf-4915-aaf8-2958b350b090
buyerType: CUSTOMER
currency: USD
status: ACTIVE
items:
- id: c039a3bd-9dc2-42fc-916f-dea189e8ec30
pricingPlanId: d0495026-dcab-45fe-858a-757491e93121
units:
- quantity: '8'
unit: USERS
customAttributes:
purchase:
preferredTime: '10:00'
'401':
description: NOT AUTHORIZED
x-codeSamples:
- lang: Shell + Curl
source: "curl --request PATCH \\\n --url https://marketplace.appdirect.com/api/v3/checkout/shoppingCarts/%7BshoppingCartId%7D \\\n --data '{\"id\":\"4f59d160-0e63-45c4-bb91-7ebe873da29f\",\"createdOn\":\"2020-10-12 07:20:50.52Z\",\"ownerUserId\":\"83407ce8-373f-11e6-ac61-9e71128cae77\",\"ownerCompanyId\":\"a411dc54-d46f-4002-ab00-3ea52e4eb118\",\"buyerType\":\"CUSTOMER\",\"currency\":\"USD\",\"status\":\"ACTIVE\",\"isBlocked\":false,\"paymentMethodId\":\"a411dc54-d46f-4002-ab00-3ea52e4eb118\",\"preAuthId\":\"a411dc54-d46f-4002-ab00-3ea52e4eb118\",\"locale\":\"en_US\",\"buyerUserId\":\"83407ce8-373f-11e6-ac61-9e71128cae77\",\"buyerCompanyId\":\"a411dc54-d46f-4002-ab00-3ea52e4eb118\",\"items\":[{\"id\":\"45ae34b7-ffc1-4d74-be78-dce34008cd2e\",\"referenceId\":\"45\",\"subscriptionId\":\"83407ce8-373f-11e6-ac61-9e71128cae77\",\"pricingPlanId\":\"3dcc468d-fd4c-41ce-b700-f88c0c74561f\",\"serviceConfiguration\":{\"date\":\"2010-10-19T00:00:00.000Z\",\"strategy\":\"CUSTOM\"},\"billingConfiguration\":{\"date\":\"1546300800000\",\"strategy\":\"CUSTOM\"},\"discountCode\":\"DISCOUNT\",\"discountId\":\"30\",\"customPrices\":[{\"costId\":\"9742e09a-e1b4-4b9e-b1a7-66df3e41cebe\",\"price\":20}],\"units\":[],\"customAttributes\":{\"vendorRequiredFields\":{\"customAttributes\":{\"preferredColours\":[\"key_red\",\"key_white\"],\"preferredTime\":\"12:00\"}},\"subscription\":{\"customAttributes\":{\"preferredColours\":[\"key_red\",\"key_white\"],\"preferredTime\":\"12:00\"}}},\"customContractConfiguration\":{\"minimumServiceLength\":1,\"minimumServiceLengthUnit\":\"MONTHLY\",\"endOfContractGracePeriod\":0,\"endOfContractGracePeriodUnit\":\"INFINITY\",\"contractCancellationPeriodLimit\":0,\"contractCancellationPeriodUnit\":\"NONE\",\"continueWithoutContract\":false,\"autoExtensionPricingId\":\"string\",\"terminationFeeGracePeriod\":0,\"terminationFeeGracePeriodUnit\":\"INFINITY\",\"blockContractUpgrades\":false,\"blockContractDowngrades\":false,\"blockSwitchToShorterContract\":false,\"keepContractDateOnPlanChange\":false,\"alignWithParentCycleStartDate\":false,\"unitTerms\":{\"property1\":{\"blockContractIncrease\":false,\"blockOriginalContractDecrease\":false,\"blockContractDecrease\":true},\"property2\":{\"blockContractIncrease\":false,\"blockOriginalContractDecrease\":false,\"blockContractDecrease\":true}},\"sourceId\":\"string\",\"terminationFee\":{\"feeType\":\"FIXED\",\"amount\":0,\"description\":\"string\"},\"contractFee\":0}}],\"customAttributes\":{\"purchase\":{\"customAttributes\":{\"preferredColours\":[\"key_red\",\"key_white\"],\"preferredTime\":\"12:00\"}},\"buyerUser\":{\"customAttributes\":{\"preferredColours\":[\"key_red\",\"key_white\"],\"preferredTime\":\"12:00\"}},\"buyerCompany\":{\"customAttributes\":{\"preferredColours\":[\"key_red\",\"key_white\"],\"preferredTime\":\"12:00\"}},\"ownerUser\":{\"customAttributes\":{\"preferredColours\":[\"key_red\",\"key_white\"],\"preferredTime\":\"12:00\"}},\"ownerCompany\":{\"customAttributes\":{\"preferredColours\":[\"key_red\",\"key_white\"],\"preferredTi
# --- truncated at 32 KB (191 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/appdirect/refs/heads/main/openapi/appdirect-shoppingcart-api-openapi.yml