@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Account v1 API
@base https://api.ebay.com/sell/account/v1
@version v1.9.3
@auth OAuth2
@endpoints 37
@hint download_for_search
@toc custom_policy(4), fulfillment_policy(6), payment_policy(6), payments_program(2), privilege(1), program(3), rate_table(1), return_policy(6), bulk_create_or_replace_sales_tax(1), sales_tax(4), subscription(1), kyc(1), advertising_eligibility(1)

@group custom_policy
@endpoint GET /custom_policy/
@optional {policy_types: str}
@returns(200) {customPolicies: [map], href: str, limit: int(int32), next: str, offset: int(int32), prev: str, total: int(int32)}
@errors {400, 500}

@endpoint POST /custom_policy/
@required {Content-Type: str}
@optional {description: str, label: str, name: str, policyType: str}
@returns(201)
@errors {400, 409, 500}

@endpoint GET /custom_policy/{custom_policy_id}
@required {custom_policy_id: str}
@returns(200) {customPolicyId: str, description: str, label: str, name: str, policyType: str}
@errors {400, 404, 500}

@endpoint PUT /custom_policy/{custom_policy_id}
@required {custom_policy_id: str, Content-Type: str}
@optional {description: str, label: str, name: str}
@returns(204)
@errors {400, 404, 409, 500}

@endgroup

@group fulfillment_policy
@endpoint POST /fulfillment_policy/
@required {Content-Type: str}
@optional {categoryTypes: [map{default: bool, name: str}], description: str, freightShipping: bool, globalShipping: bool, handlingTime: map{unit: str, value: int(int32)}, localPickup: bool, marketplaceId: str, name: str, pickupDropOff: bool, shippingOptions: [map{costType: str, insuranceFee: map, insuranceOffered: bool, optionType: str, packageHandlingCost: map, rateTableId: str, shippingDiscountProfileId: str, shippingPromotionOffered: bool, shippingServices: [map]}], shipToLocations: map{regionExcluded: [map], regionIncluded: [map]}}
@returns(201) {categoryTypes: [map], description: str, freightShipping: bool, fulfillmentPolicyId: str, globalShipping: bool, handlingTime: map{unit: str, value: int(int32)}, localPickup: bool, marketplaceId: str, name: str, pickupDropOff: bool, shippingOptions: [map], shipToLocations: map{regionExcluded: [map], regionIncluded: [map]}, warnings: [map]}
@errors {400, 500}

@endpoint GET /fulfillment_policy/{fulfillmentPolicyId}
@required {fulfillmentPolicyId: str}
@returns(200) {categoryTypes: [map], description: str, freightShipping: bool, fulfillmentPolicyId: str, globalShipping: bool, handlingTime: map{unit: str, value: int(int32)}, localPickup: bool, marketplaceId: str, name: str, pickupDropOff: bool, shippingOptions: [map], shipToLocations: map{regionExcluded: [map], regionIncluded: [map]}}
@errors {400, 404, 500}

@endpoint PUT /fulfillment_policy/{fulfillmentPolicyId}
@required {fulfillmentPolicyId: str, Content-Type: str}
@optional {categoryTypes: [map{default: bool, name: str}], description: str, freightShipping: bool, globalShipping: bool, handlingTime: map{unit: str, value: int(int32)}, localPickup: bool, marketplaceId: str, name: str, pickupDropOff: bool, shippingOptions: [map{costType: str, insuranceFee: map, insuranceOffered: bool, optionType: str, packageHandlingCost: map, rateTableId: str, shippingDiscountProfileId: str, shippingPromotionOffered: bool, shippingServices: [map]}], shipToLocations: map{regionExcluded: [map], regionIncluded: [map]}}
@returns(200) {categoryTypes: [map], description: str, freightShipping: bool, fulfillmentPolicyId: str, globalShipping: bool, handlingTime: map{unit: str, value: int(int32)}, localPickup: bool, marketplaceId: str, name: str, pickupDropOff: bool, shippingOptions: [map], shipToLocations: map{regionExcluded: [map], regionIncluded: [map]}, warnings: [map]}
@errors {400, 404, 500}

@endpoint DELETE /fulfillment_policy/{fulfillmentPolicyId}
@required {fulfillmentPolicyId: str}
@returns(204)
@errors {400, 404, 409, 500}

@endpoint GET /fulfillment_policy
@required {marketplace_id: str}
@optional {Content-Language: str}
@returns(200) {fulfillmentPolicies: [map], href: str, limit: int(int32), next: str, offset: int(int32), prev: str, total: int(int32)}
@errors {400, 500}

@endpoint GET /fulfillment_policy/get_by_policy_name
@required {marketplace_id: str, name: str}
@optional {Content-Language: str}
@returns(200) {categoryTypes: [map], description: str, freightShipping: bool, fulfillmentPolicyId: str, globalShipping: bool, handlingTime: map{unit: str, value: int(int32)}, localPickup: bool, marketplaceId: str, name: str, pickupDropOff: bool, shippingOptions: [map], shipToLocations: map{regionExcluded: [map], regionIncluded: [map]}}
@errors {400, 500}

@endgroup

@group payment_policy
@endpoint GET /payment_policy
@required {marketplace_id: str}
@optional {Content-Language: str}
@returns(200) {href: str, limit: int(int32), next: str, offset: int(int32), paymentPolicies: [map], prev: str, total: int(int32)}
@errors {400, 500}

@endpoint POST /payment_policy
@required {Content-Type: str}
@optional {categoryTypes: [map{default: bool, name: str}], deposit: map{amount: map, dueIn: map, paymentMethods: [map]}, description: str, fullPaymentDueIn: map{unit: str, value: int(int32)}, immediatePay: bool, marketplaceId: str, name: str, paymentInstructions: str, paymentMethods: [map{brands: [str], paymentMethodType: str, recipientAccountReference: map}]}
@returns(201) {categoryTypes: [map], deposit: map{amount: map{currency: str, value: str}, dueIn: map{unit: str, value: int(int32)}, paymentMethods: [map]}, description: str, fullPaymentDueIn: map{unit: str, value: int(int32)}, immediatePay: bool, marketplaceId: str, name: str, paymentInstructions: str, paymentMethods: [map], paymentPolicyId: str, warnings: [map]}
@errors {400, 500}

@endpoint GET /payment_policy/{payment_policy_id}
@required {payment_policy_id: str}
@returns(200) {categoryTypes: [map], deposit: map{amount: map{currency: str, value: str}, dueIn: map{unit: str, value: int(int32)}, paymentMethods: [map]}, description: str, fullPaymentDueIn: map{unit: str, value: int(int32)}, immediatePay: bool, marketplaceId: str, name: str, paymentInstructions: str, paymentMethods: [map], paymentPolicyId: str}
@errors {400, 404, 500}

@endpoint PUT /payment_policy/{payment_policy_id}
@required {payment_policy_id: str, Content-Type: str}
@optional {categoryTypes: [map{default: bool, name: str}], deposit: map{amount: map, dueIn: map, paymentMethods: [map]}, description: str, fullPaymentDueIn: map{unit: str, value: int(int32)}, immediatePay: bool, marketplaceId: str, name: str, paymentInstructions: str, paymentMethods: [map{brands: [str], paymentMethodType: str, recipientAccountReference: map}]}
@returns(200) {categoryTypes: [map], deposit: map{amount: map{currency: str, value: str}, dueIn: map{unit: str, value: int(int32)}, paymentMethods: [map]}, description: str, fullPaymentDueIn: map{unit: str, value: int(int32)}, immediatePay: bool, marketplaceId: str, name: str, paymentInstructions: str, paymentMethods: [map], paymentPolicyId: str, warnings: [map]}
@errors {400, 404, 500}

@endpoint DELETE /payment_policy/{payment_policy_id}
@required {payment_policy_id: str}
@returns(204)
@errors {400, 404, 409, 500}

@endpoint GET /payment_policy/get_by_policy_name
@required {marketplace_id: str, name: str}
@optional {Content-Language: str}
@returns(200) {categoryTypes: [map], deposit: map{amount: map{currency: str, value: str}, dueIn: map{unit: str, value: int(int32)}, paymentMethods: [map]}, description: str, fullPaymentDueIn: map{unit: str, value: int(int32)}, immediatePay: bool, marketplaceId: str, name: str, paymentInstructions: str, paymentMethods: [map], paymentPolicyId: str}
@errors {400, 500}

@endgroup

@group payments_program
@endpoint GET /payments_program/{marketplace_id}/{payments_program_type}
@required {marketplace_id: str, payments_program_type: str}
@returns(200) {marketplaceId: str, paymentsProgramType: str, status: str, wasPreviouslyOptedIn: bool}
@errors {400, 404, 500}

@endpoint GET /payments_program/{marketplace_id}/{payments_program_type}/onboarding
@required {marketplace_id: str, payments_program_type: str}
@returns(200) {onboardingStatus: str, steps: [map]}
@errors {400, 404, 500}

@endgroup

@group privilege
@endpoint GET /privilege
@returns(200) {sellerRegistrationCompleted: bool, sellingLimit: map{amount: map{currency: str, value: str}, quantity: int(int32)}}
@errors {400, 500}

@endgroup

@group program
@endpoint GET /program/get_opted_in_programs
@returns(200) {programs: [map]}
@errors {400, 404, 500}

@endpoint POST /program/opt_in
@required {Content-Type: str}
@optional {programType: str}
@returns(200)
@errors {400, 404, 409, 500}

@endpoint POST /program/opt_out
@required {Content-Type: str}
@optional {programType: str}
@returns(200)
@errors {400, 404, 409, 500}

@endgroup

@group rate_table
@endpoint GET /rate_table
@optional {country_code: str}
@returns(200) {rateTables: [map]}
@errors {400, 500}

@endgroup

@group return_policy
@endpoint GET /return_policy
@required {marketplace_id: str}
@optional {Content-Language: str}
@returns(200) {href: str, limit: int(int32), next: str, offset: int(int32), prev: str, returnPolicies: [map], total: int(int32)}
@errors {400, 500}

@endpoint POST /return_policy
@required {Content-Type: str}
@optional {categoryTypes: [map{default: bool, name: str}], description: str, extendedHolidayReturnsOffered: bool, internationalOverride: map{returnMethod: str, returnPeriod: map, returnsAccepted: bool, returnShippingCostPayer: str}, marketplaceId: str, name: str, refundMethod: str, restockingFeePercentage: str, returnInstructions: str, returnMethod: str, returnPeriod: map{unit: str, value: int(int32)}, returnsAccepted: bool, returnShippingCostPayer: str}
@returns(201) {categoryTypes: [map], description: str, extendedHolidayReturnsOffered: bool, internationalOverride: map{returnMethod: str, returnPeriod: map{unit: str, value: int(int32)}, returnsAccepted: bool, returnShippingCostPayer: str}, marketplaceId: str, name: str, refundMethod: str, restockingFeePercentage: str, returnInstructions: str, returnMethod: str, returnPeriod: map{unit: str, value: int(int32)}, returnPolicyId: str, returnsAccepted: bool, returnShippingCostPayer: str, warnings: [map]}
@errors {400, 500}

@endpoint GET /return_policy/{return_policy_id}
@required {return_policy_id: str}
@returns(200) {categoryTypes: [map], description: str, extendedHolidayReturnsOffered: bool, internationalOverride: map{returnMethod: str, returnPeriod: map{unit: str, value: int(int32)}, returnsAccepted: bool, returnShippingCostPayer: str}, marketplaceId: str, name: str, refundMethod: str, restockingFeePercentage: str, returnInstructions: str, returnMethod: str, returnPeriod: map{unit: str, value: int(int32)}, returnPolicyId: str, returnsAccepted: bool, returnShippingCostPayer: str}
@errors {400, 404, 500}

@endpoint PUT /return_policy/{return_policy_id}
@required {return_policy_id: str, Content-Type: str}
@optional {categoryTypes: [map{default: bool, name: str}], description: str, extendedHolidayReturnsOffered: bool, internationalOverride: map{returnMethod: str, returnPeriod: map, returnsAccepted: bool, returnShippingCostPayer: str}, marketplaceId: str, name: str, refundMethod: str, restockingFeePercentage: str, returnInstructions: str, returnMethod: str, returnPeriod: map{unit: str, value: int(int32)}, returnsAccepted: bool, returnShippingCostPayer: str}
@returns(200) {categoryTypes: [map], description: str, extendedHolidayReturnsOffered: bool, internationalOverride: map{returnMethod: str, returnPeriod: map{unit: str, value: int(int32)}, returnsAccepted: bool, returnShippingCostPayer: str}, marketplaceId: str, name: str, refundMethod: str, restockingFeePercentage: str, returnInstructions: str, returnMethod: str, returnPeriod: map{unit: str, value: int(int32)}, returnPolicyId: str, returnsAccepted: bool, returnShippingCostPayer: str, warnings: [map]}
@errors {400, 404, 500}

@endpoint DELETE /return_policy/{return_policy_id}
@required {return_policy_id: str}
@returns(204)
@errors {400, 404, 409, 500}

@endpoint GET /return_policy/get_by_policy_name
@required {marketplace_id: str, name: str}
@optional {Content-Language: str}
@returns(200) {categoryTypes: [map], description: str, extendedHolidayReturnsOffered: bool, internationalOverride: map{returnMethod: str, returnPeriod: map{unit: str, value: int(int32)}, returnsAccepted: bool, returnShippingCostPayer: str}, marketplaceId: str, name: str, refundMethod: str, restockingFeePercentage: str, returnInstructions: str, returnMethod: str, returnPeriod: map{unit: str, value: int(int32)}, returnPolicyId: str, returnsAccepted: bool, returnShippingCostPayer: str}
@errors {400, 500}

@endgroup

@group bulk_create_or_replace_sales_tax
@endpoint POST /bulk_create_or_replace_sales_tax
@optional {salesTaxInputList: [map{countryCode: str, salesTaxJurisdictionId: str, salesTaxPercentage: str, shippingAndHandlingTaxed: bool}]}
@returns(200) {updatedSalesTaxEntries: [map]}
@returns(207)
@errors {400, 500}

@endgroup

@group sales_tax
@endpoint GET /sales_tax/{countryCode}/{jurisdictionId}
@required {countryCode: str, jurisdictionId: str}
@returns(200) {countryCode: str, salesTaxJurisdictionId: str, salesTaxPercentage: str, shippingAndHandlingTaxed: bool}
@returns(204)
@errors {400, 404, 500}

@endpoint PUT /sales_tax/{countryCode}/{jurisdictionId}
@required {countryCode: str, jurisdictionId: str, Content-Type: str}
@optional {salesTaxPercentage: str, shippingAndHandlingTaxed: bool}
@returns(204)
@errors {400, 404, 500}

@endpoint DELETE /sales_tax/{countryCode}/{jurisdictionId}
@required {countryCode: str, jurisdictionId: str}
@returns(204)
@errors {400, 404, 500}

@endpoint GET /sales_tax
@required {country_code: str}
@returns(200) {salesTaxes: [map]}
@errors {400, 500}

@endgroup

@group subscription
@endpoint GET /subscription
@optional {limit: str, continuation_token: str}
@returns(200) {href: str, limit: int(int32), next: str, subscriptions: [map], total: int(int32)}
@errors {400, 500}

@endgroup

@group kyc
@endpoint GET /kyc
@returns(200) {kycChecks: [map]}
@returns(204)
@errors {400, 500}

@endgroup

@group advertising_eligibility
@endpoint GET /advertising_eligibility
@required {X-EBAY-C-MARKETPLACE-ID: str}
@optional {program_types: str}
@returns(200) {advertisingEligibility: [map]}
@errors {400, 500}

@endgroup

@end
