Skip to content

Create default business policies on an eBay account

POST
/api/v1/workspaces/{workspaceId}/channel-connections/{connectionId}/ebay/business-policies/defaults
curl --request POST \
--url https://api.crossmart.io/api/v1/workspaces/example/channel-connections/example/ebay/business-policies/defaults

Creates free standard shipping, immediate payment and 30-day return policies on the eBay account (opting it in to business policies first when needed), reads the policies again and chooses the new ones as the listing defaults. Policies that already exist are used as they are, so calling this twice is harmless. Marketplaces without a default shipping service answer 422.

workspaceId
required
string
connectionId
required
string
Media typeapplication/json
object
id
required
string format: uuid
channel
required
string
Allowed values: shopify ebay google_merchant etsy amazon walmart
externalAccountId
required

The account on the channel

string
displayName
required
string
status
required
string
Allowed values: CONNECTED NEEDS_REAUTH DISCONNECTED ERROR
statusReason
required

Why it needs re-auth or failed

string
nullable
grantedScopes
required
Array<string>
missingFeatures
required

What the connection cannot do until the merchant approves the app again

Array<string>
Allowed values: storefront_visibility order_sync
shopify
required

The store’s details, for Shopify connections

object
shopName
required
string
currencyCode
required

ISO 4217 code of the store’s currency

string
ianaTimezone
required
string
nullable
primaryDomainUrl
required

The storefront’s public URL

string
nullable
primaryLocation
required

Where Crossmart reads and writes stock

object
id
required
string
name
required
string
ebay
required

The account’s details on its marketplace, for eBay connections

object
marketplaceId
required
string
Allowed values: EBAY_US EBAY_GB EBAY_DE EBAY_AU EBAY_CA EBAY_FR EBAY_IT EBAY_ES
currencyCode
required

ISO 4217 code of the marketplace’s currency

string
username
required
string
userId
required

EBay’s immutable id of the user

string
businessPoliciesEnabled
required

False when the account has not opted in to business policies on eBay

boolean
policies
required
object
fulfillment
required
Array<object>
object
id
required
string
name
required
string
payment
required
Array<object>
object
id
required
string
name
required
string
return
required
Array<object>
object
id
required
string
name
required
string
listingDefaults
required

What listings are published with; policies resolve to the only one of a type

object
fulfillmentPolicyId
required
string
nullable
paymentPolicyId
required
string
nullable
returnPolicyId
required
string
nullable
condition
required
string
Allowed values: NEW LIKE_NEW NEW_OTHER NEW_WITH_DEFECTS CERTIFIED_REFURBISHED EXCELLENT_REFURBISHED VERY_GOOD_REFURBISHED GOOD_REFURBISHED SELLER_REFURBISHED USED_EXCELLENT USED_VERY_GOOD USED_GOOD USED_ACCEPTABLE FOR_PARTS_OR_NOT_WORKING
location
required
object
postalCode
required
string
country
required

ISO 3166 alpha-2 country code

string
city
required
string
nullable
merchantLocationKey
required

The inventory location Crossmart created on eBay for location

string
nullable
readyToList
required

Whether listings can be published: policies of each type and a ship-from set

boolean
googleMerchant
required

The Merchant Center account and its listing setup, for Google connections

object
accountId
required
string
accountName
required
string
homepageUri
required

The website the account claimed; product links must be on it

string
nullable
homepageClaimed
required

Whether the account verified and claimed its website

boolean
country
required
string
Allowed values: US GB CA AU DE FR IT ES NL IL
currencyCode
required

ISO 4217 code of the country’s currency

string
contentLanguage
required

The language listings are written in

string
listingSetup
required

Null until the merchant saves it; publishing needs it

object
country
required
string
Allowed values: US GB CA AU DE FR IT ES NL IL
productUrlTemplate
required
string
dataSourceId
required

The Merchant Center API data source Crossmart publishes into

string
readyToList
required

Whether the listing setup is saved, so products can be listed

boolean
productSelection
required

Which products the connection lists; null lists every product

object
filter
required
object
search

Matches title, handle or SKU

string
status
string
Allowed values: DRAFT ACTIVE ARCHIVED
gap
string
Allowed values: images description sku barcode out_of_stock
tags

Products with any of these tags

Array<string>
vendor

Products of this vendor, ignoring case

string
includeProductIds
required
Array<string>
excludeProductIds
required
Array<string>
pricing
required

How the connection prices variants; null sends catalog prices

object
adjustmentPercent
required

Markup (positive) or discount (negative), -90 to 500

string
fixedAmount
required

Added after the percentage; may be negative

string
rounding
required
string
Allowed values: none ending_99 ending_95 whole
floor
required
object
minMarginPercent
required

Never price below cost plus this percentage (0 to 1000)

string
compareAt
required
string
Allowed values: adjust keep omit
fixedExchangeRate

Store-currency units per catalog-currency unit, used instead of the ECB daily rate. Only applies when the store sells in another currency than the workspace.

string
nullable
connectedAt
required
string format: date-time
disconnectedAt
required
string format: date-time
nullable
lastSyncedAt
required
string format: date-time
nullable
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
failedListings
required

Listings in this store whose last sync failed

number
publishReadiness
required

Whether listings can be published here, and what the store setup lacks

object
ready
required

True when listings can be published to this store

boolean
missing
required

What to finish before publishing, in order; empty when ready. reconnect alone when the store needs to be connected again. eBay: shipping_policy, payment_policy, return_policy, ship_from_location. Google: listing_setup. account_settings when the account was never read.

Array<string>
Allowed values: reconnect account_settings shipping_policy payment_policy return_policy ship_from_location listing_setup images active_product category item_specifics option_names

Example

{
"channel": "shopify",
"externalAccountId": "demo-store.myshopify.com",
"displayName": "Demo Store",
"status": "CONNECTED",
"missingFeatures": [
"storefront_visibility"
],
"shopify": {
"currencyCode": "USD",
"ianaTimezone": "America/New_York",
"primaryLocation": {
"id": "gid://shopify/Location/1001"
}
},
"ebay": {
"marketplaceId": "EBAY_US",
"currencyCode": "USD",
"username": "demo_seller",
"policies": {
"fulfillment": [
{
"id": "6000000001",
"name": "Free shipping"
}
],
"payment": [
{
"id": "6000000001",
"name": "Free shipping"
}
],
"return": [
{
"id": "6000000001",
"name": "Free shipping"
}
]
},
"listingDefaults": {
"condition": "NEW",
"location": {
"postalCode": "95125",
"country": "US",
"city": "San Jose"
}
}
},
"googleMerchant": {
"accountId": "123456789",
"accountName": "Acme Goods",
"country": "US",
"currencyCode": "USD",
"contentLanguage": "en",
"listingSetup": {
"country": "US",
"productUrlTemplate": "https://acme.example/products/{handle}"
}
},
"productSelection": {
"filter": {
"status": "DRAFT",
"gap": "images"
}
},
"pricing": {
"adjustmentPercent": "15",
"fixedAmount": "0",
"rounding": "none",
"floor": {
"minMarginPercent": "30"
},
"compareAt": "adjust",
"fixedExchangeRate": "0.92"
},
"publishReadiness": {
"missing": [
"shipping_policy",
"ship_from_location"
]
}
}