inventory APIv1.6.0

publishOffer

POST
/offer/{offerId}/publish/
This call is used to convert an unpublished offer into a published offer, or live eBay listing. The unique identifier of the offer (offerId) is passed in at the end of the call URI.

For those who prefer to publish multiple offers (up to 25 at a time) with one call, the bulkPublishOffer method can be used. In the case of a multiple-variation listing, the publishOfferByInventoryItemGroup call should be used instead, as this call will convert all unpublished offers associated with an inventory item group into a multiple-variation listing.

Input

Resource URI (production)

POST https://api.ebay.com/sell/inventory/v1/offer/{offerId}/publish/

URI parameters

ParameterTypeDescription
offerIdstringThe unique identifier of the offer that is to be published.

Occurrence: Required

HTTP request headers

All requests made to eBay REST operations require you to provide the Authorization HTTP header for authentication authorization.

OAuth scope

This request requires an access token created with the authorization code grant flow, using one scope from the following list:

https://api.ebay.com/oauth/api_scope/sell.inventory

See OAuth access tokens for more information.

Output

HTTP response headers

Output container/fieldTypeDescription
warningsarray of ErrorDetailV3This container will contain an array of errors and/or warnings if any occur when a publishOffer or publishOfferByInventoryItemGroup call is made.

Occurrence: Conditional

warnings.errorIdintegerA unique code that identifies the particular error or warning that occurred. Your application can use error codes as identifiers in your customized error-handling algorithms.

Occurrence: Conditional

warnings.domainstringThe name of the domain in which the error or warning occurred.

Occurrence: Conditional

warnings.subdomainstringThe name of the subdomain in which the error or warning occurred.

Occurrence: Conditional

warnings.categorystringThis string value indicates the error category. There are three categories of errors: request errors, application errors, and system errors.

Occurrence: Conditional

warnings.messagestringA description of the condition that caused the error or warning.

Occurrence: Conditional

warnings.parametersarray of ErrorParameterV3Various warning and error messages return one or more variables that contain contextual information about the error or waring. This is often the field or value that triggered the error or warning.

Occurrence: Conditional

warnings.parameters.valuestringThis is the actual value that was passed in for the element specified in the name field.

Occurrence: Conditional

warnings.parameters.namestringThis is the name of input field that caused an issue with the call request.

Occurrence: Conditional

warnings.longMessagestringA detailed description of the condition that caused the error or warning, and information on what to do to correct the problem.

Occurrence: Conditional

warnings.inputRefIdsarray of stringAn array of one or more reference IDs which identify the specific request element(s) most closely associated to the error or warning, if any.

Occurrence: Conditional

warnings.outputRefIdsarray of stringAn array of one or more reference IDs which identify the specific response element(s) most closely associated to the error or warning, if any.

Occurrence: Conditional

listingIdstringThe unique identifier of the newly created eBay listing. This field is returned if the single offer (if publishOffer call was used) or group of offers in an inventory item group (if publishOfferByInventoryItemGroup call was used) was successfully converted into an eBay listing.

Occurrence: Conditional

HTTP status codes

This call can return one of the following HTTP status codes. For an overview of the status codes, see HTTP status codes in Using eBay RESTful APIs.

StatusMeaning
200Success
400Bad Request
404Not Found
500Internal Server Error

Error codes

CodeDomainCategoryMeaning
25001API_INVENTORYAPPLICATIONA system error has occurred. {additionalInfo}
25002API_INVENTORYREQUESTA user error has occurred. {additionalInfo}
25003API_INVENTORYREQUESTThe eBay listing associated with the inventory item, or the unpublished offer has an invalid price. {additionalInfo}
25004API_INVENTORYREQUESTThe eBay listing associated with the inventory item, or the unpublished offer has an invalid quantity. {additionalInfo}
25005API_INVENTORYREQUESTThe eBay listing associated with the inventory item, or the unpublished offer has an invalid category ID. {additionalInfo}
25006API_INVENTORYREQUESTThe eBay listing associated with the inventory item, or the unpublished offer has an invalid listing option. {additionalInfo}
25007API_INVENTORYREQUESTThe eBay listing associated with the inventory item, or the unpublished offer has invalid data in the associated Fulfillment policy. {additionalInfo}
25008API_INVENTORYREQUESTThe eBay listing associated with the inventory item, or the unpublished offer has invalid data in the associated Payment policy. {additionalInfo}
25009API_INVENTORYREQUESTThe eBay listing associated with the inventory item, or the unpublished offer has invalid data in the associated Return policy. {additionalInfo}
25011API_INVENTORYREQUESTInvalid tax information. {additionalInfo}
25012API_INVENTORYREQUESTInvalid inventory location. {additionalInfo}
25013API_INVENTORYREQUESTInvalid data in the Inventory Item Group. {additionalInfo}
25014API_INVENTORYREQUESTThe eBay listing associated with the inventory item, or the unpublished offer has invalid pictures. {additionalInfo}
25015API_INVENTORYREQUESTThe eBay listing associated with the inventory item, or the unpublished offer has an invalid picture URL. {additionalInfo}
25016API_INVENTORYREQUESTThe {fieldName} value is invalid. {additionalInfo}
25017API_INVENTORYREQUEST{fieldName} is missing. {additionalInfo}
25018API_INVENTORYREQUESTIncomplete account information. {additionalInfo}
25019API_INVENTORYREQUESTCannot revise listing. {additionalInfo}
25020API_INVENTORYREQUESTThe eBay listing associated with the inventory item, or the unpublished offer has invalid shipping package details. {additionalInfo}
25021API_INVENTORYREQUESTThe eBay listing associated with the inventory item, or the unpublished offer has invalid item condition information. {additionalInfo}
25022API_INVENTORYREQUESTInvalid attribute. {fieldName}
25023API_INVENTORYREQUESTInvalid compatibility information. {additionalInfo}
25025API_INVENTORYAPPLICATIONConcurrent access of the same Inventory or Inventory Item Group object is not allowed. Please try again later.
25026API_INVENTORYREQUESTSelling limit exceeded. {additionalInfo}
25601API_INVENTORYREQUEST{fieldName} is an invalid attribute.
25604API_INVENTORYREQUESTInput error. {additionalInfo}
25713API_INVENTORYREQUESTThis Offer is not available : {additionalInfo}.

Samples

New to making API calls? Please see Making a Call.

Note: Identifiers, such as order IDs or user IDs, and personal data in these samples might be anonymized or may no longer be active on eBay. If necessary, substitute current, relevant eBay data in your requests.

Sample 1: Publishing an Offer for an Inventory Item

This call will publish an offer on an eBay marketplace

Input

The offerId path parameter is required in order to specify the order that is being published. This call has no request payload.
POST
https://api.ebay.com/sell/inventory/v1/offer/publish/36445435465

Output

Upon a successful publishing of an offer, the listingId value is returned in the call response. This listingId value is the eBay Item ID for successfully created listing.