inventory APIv1.6.0

publishOfferByInventoryItemGroup

POST
/offer/publish_by_inventory_item_group/
Note: Please note that any eBay listing created using the Inventory API cannot be revised or relisted using the Trading API calls.

This call is used to convert all unpublished offers associated with an inventory item group into an active, multiple-variation listing.

The unique identifier of the inventory item group (inventoryItemGroupKey) is passed in the request payload. All inventory items and their corresponding offers in the inventory item group must be valid (meet all requirements) for the publishOfferByInventoryItemGroup call to be completely successful. For any inventory items in the group that are missing required data or have no corresponding offers, the publishOfferByInventoryItemGroup will create a new multiple-variation listing, but any inventory items with missing required data/offers will not be in the newly-created listing. If any inventory items in the group to be published have invalid data, or one or more of the inventory items have conflicting data with one another, the publishOfferByInventoryItemGroup call will fail. Be sure to check for any error or warning messages in the call response for any applicable information about one or more inventory items/offers having issues.

Input

Resource URI (production)

POST https://api.ebay.com/sell/inventory/v1/offer/publish_by_inventory_item_group/

URI parameters

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.

Input container/fieldTypeDescription
inventoryItemGroupKeystringThis is the unique identifier of the inventory item group. All unpublished offers associated with this inventory item group will be published as a multiple-variation listing if the publishByInventoryItemGroup call is successful. The inventoryItemGroupKey identifier is automatically generated by eBay once an inventory item group is created.

To retrieve an inventoryItemGroupKey value, you can use the getInventoryItem call to retrieve an inventory item that is known to be in the inventory item group to publish, and then look for the inventory item group identifier under the groupIds container in the response of that call.

Occurrence: Required

marketplaceIdMarketplaceEnumThis is the unique identifier of the eBay site on which the the multiple-variation listing will be published. The marketPlaceId enumeration values are found in MarketplaceIdEnum.

Occurrence: Required

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
500Internal Server Error

Error codes

CodeDomainCategoryMeaning
25001API_INVENTORYAPPLICATIONAny System error. {additionalInfo}
25002API_INVENTORYREQUESTAny User error. {additionalInfo}
25003API_INVENTORYREQUESTInvalid price. {additionalInfo}
25004API_INVENTORYREQUESTInvalid quantity. {additionalInfo}
25005API_INVENTORYREQUESTInvalid category. {additionalInfo}
25006API_INVENTORYREQUESTInvalid listing option. {additionalInfo}
25007API_INVENTORYREQUESTInvalid Shipping policy information. {additionalInfo}
25008API_INVENTORYREQUESTInvalid Payment policy information. {additionalInfo}
25009API_INVENTORYREQUESTInvalid Return policy information. {additionalInfo}
25011API_INVENTORYREQUESTInvalid tax information. {additionalInfo}
25012API_INVENTORYREQUESTInvalid location. {additionalInfo}
25013API_INVENTORYREQUESTInvalid InventoryItemGroup information. {additionalInfo}
25014API_INVENTORYREQUESTInvalid pictures. {additionalInfo}
25015API_INVENTORYREQUESTInvalid picture URL. {additionalInfo}
25016API_INVENTORYREQUESTInvalid {fieldName}. {additionalInfo}
25017API_INVENTORYREQUESTMissing field {fieldName}. {additionalInfo}
25018API_INVENTORYREQUESTIncomplete account information. {additionalInfo}
25019API_INVENTORYREQUESTCannot revise listing. {additionalInfo}
25020API_INVENTORYREQUESTInvalid package details. {additionalInfo}
25021API_INVENTORYREQUESTInvalid condition information. {additionalInfo}
25022API_INVENTORYREQUESTInvalid attribute. {fieldName}
25023API_INVENTORYREQUESTInvalid compatibility information. {additionalInfo}
25025API_INVENTORYAPPLICATIONConcurrent access of Inventory or InventoryItemGroup. Please try again later
25026API_INVENTORYREQUESTSelling limits exceeded. {additionalInfo}
25601API_INVENTORYREQUESTInvalid attribute. {fieldName}
25604API_INVENTORYREQUESTInput error. {additionalInfo}
25713API_INVENTORYREQUESTThis Offer is not available : {additionalInfo}.

Samples

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

Note: Some item IDs, user IDs, or other data in these samples might no longer be active on eBay. If necessary, you can substitute current eBay data in your requests.

Sample 1: Publishing a Multiple-Variation Offer

This call publishes a multiple-variation listing from a group of inventory items (with corresponding offers ready to publish).

Input

No query or URI path parameters are needed for this call.

A multiple-variation listing will be created for all inventory items defined in the specified inventory item group, which is specified in the inventoryItemGroupKey field in the request payload. The eBay Marketplace where the listing will be posted is also specified through the marketplaceId field in the request payload.
POST
https://api.ebay.com/sell/inventory/v1/offer/publish_by_inventory_item_group

Output

A successful call will create a multiple-variation listing, with each inventory item in the group becoming a separate variation within the listing. The unique identifier of the newly created listing is returned in the listingId field.

One or more warning or error messages will be returned if any occur.