ebay.listing
ballerinax/ebay.listing Ballerina library
Overview
This is a generated connector for eBay Listing API v1_beta.3.0 OpenAPI specification. The Ebay Listing API enables partners to create draft listings on eBay for their seller. The Listing API contains the createItemDraft method that enables Partners to create an eBay draft of an item for their seller using information from their site. The seller can then log into their eBay account, finish the listing, and publish the item onto the eBay site. API Documentation
Prerequisites
Before using this connector in your Ballerina application, complete the following:
- Create an ebay developer account
- Obtain tokens - follow this link to obtain tokens
Clients
ebay.listing: Client
This is a generated connector for eBay Listing API v1_beta.3.0 OpenAPI specification. 'Note: This is a (Limited Release)
API available only to select developers approved by business units.
Enables a seller adding an ad or item on a Partner''s site to automatically create an eBay listing draft using the item details from the Partner''s site.'
Constructor
Gets invoked to initialize the connector
.
The connector initialization requires setting the API credentials.
Create a developer account and obtain tokens following this guide.
init (ConnectionConfig config, string serviceUrl)
- config ConnectionConfig - The configurations to be used when initializing the
connector
- serviceUrl string "https://api.ebay.com/sell/listing/v1_beta" - URL of the target service
createItemDraft
function createItemDraft(string xEbayCMarketplaceId, ItemDraft payload, string? contentLanguage) returns ItemDraftResponse|error
This call gives Partners the ability to create an eBay draft of a item for their seller using information from their site. This lets the Partner increase the exposure of items on their site and leverage the eBay user listing experience seamlessly. This experience provides guidance on pricing, aspects, etc. and recommendations that help create a listing that is complete and improves the exposure of the listing in search results. After the listing draft is created, the seller logs into their eBay account and uses the listing experience to finish the listing and publish the item on eBay.
Parameters
- xEbayCMarketplaceId string - Use this header to specify an eBay marketplace ID. For a list of supported sites, see API Restrictions in the Listing API overview.
- payload ItemDraft -
- contentLanguage string? (default ()) - Use this header to specify the natural language of the seller. For details, see Content-Language in HTTP request headers. Required: For EBAY_CA in French. (Content-Language = fr-CA)
Return Type
- ItemDraftResponse|error - OK
Records
ebay.listing: Amount
The type that defines the fields for the currency and a monetary amount.
Fields
- currency string? - The three-letter ISO 4217 code representing the currency of the amount in the value field. Restriction: Only the currency of the marketplace is supported. For example, on the US marketplace the only currency supported is USD. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/listing/types/bas:CurrencyCodeEnum'>eBay API documentation</a>
- value string? - The monetary amount, in the currency specified by the currency field.
ebay.listing: Aspect
The type that defines the fields for the item aspects.
Fields
- name string? - The name of an aspect, such and Brand.
- values string[]? - A list of potential values for this aspect.
ebay.listing: Charity
This type is used to identify the charitable organization that will receive a percentage of sale proceeds for each sale generated by the listing. This container also includes the donation percentage, which is the percentage of the sale proceeds that the charitable organization will get. In order to receive a percentage of the sales proceeds, the non-profit organization must be registered with the PayPal Giving Fund, which is a partner of eBay for Charity.
Fields
- donationPercentage string? - This field sets the percentage of the purchase price that the charitable organization (identified in the charityId field) will receive for each sale that the listing generates. This field is conditionally required if a seller is planning on donating a percentage of the sale proceeds to a charitable organization. This numeric value can range from 10 to 100, and in any 5 (percent) increments in between this range (e.g. 10, 15, 20...95,... 100). The seller would pass in 10 for 10 percent, 15 for 15 percent, 20 for 20 percent, and so on, all the way to 100 for 100 percent. Note: For this field, createItemDraft will only validate that a positive integer value is supplied, so the listing draft will still be successfully created (with no error or warning message) if a non-supported value is specified. However, if the seller attempted to publish this listing draft with an unsupported value, the charity information would just be dropped from the listing.
- charityId string? - The eBay-assigned unique identifier of the charitable organization that will receive a percentage of the sales proceeds. The charitable organization must be reqistered with the PayPal Giving Fund in order to receive sales proceeds through eBay listings. This field is conditionally required if a seller is planning on donating a percentage of the sale proceeds to a charitable organization. The eBay-assigned unique identifier of a charitable organization can be found using the GetCharities call of the Trading API. In the GetCharities call response, this unique identifier is shown in the id attribute of the Charity container.
ebay.listing: ClientHttp1Settings
Provides settings related to HTTP/1.x protocol.
Fields
- keepAlive KeepAlive(default http:KEEPALIVE_AUTO) - Specifies whether to reuse a connection for multiple requests
- chunking Chunking(default http:CHUNKING_AUTO) - The chunking behaviour of the request
- proxy ProxyConfig? - Proxy server related options
ebay.listing: ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth BearerTokenConfig|OAuth2RefreshTokenGrantConfig - Configurations related to client authentication
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings ClientHttp1Settings? - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings? - Configurations related to HTTP/2 protocol
- timeout decimal(default 60) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded
/x-forwarded
header
- poolConfig PoolConfiguration? - Configurations associated with request pooling
- cache CacheConfig? - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker CircuitBreakerConfig? - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig RetryConfig? - Configurations associated with retrying
- responseLimits ResponseLimitConfigs? - Configurations associated with inbound response size limits
- secureSocket ClientSecureSocket? - SSL/TLS-related options
- proxy ProxyConfig? - Proxy server related options
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
ebay.listing: Error
This type defines the fields that can be returned in an error.
Fields
- category string? - Identifies the type of erro.
- domain string? - Name for the primary system where the error occurred. This is relevant for application errors.
- errorId int? - A unique number to identify the error.
- inputRefIds string[]? - An array of request elements most closely associated to the error.
- longMessage string? - A more detailed explanation of the error.
- message string? - Information on how to correct the problem, in the end user's terms and language where applicable.
- outputRefIds string[]? - An array of request elements most closely associated to the error.
- parameters ErrorParameter[]? - An array of name/value pairs that describe details the error condition. These are useful when multiple errors are returned.
- subdomain string? - Further helps indicate which subsystem the error is coming from. System subcategories include: Initialization, Serialization, Security, Monitoring, Rate Limiting, etc.
ebay.listing: ErrorParameter
Fields
- name string? - The object of the error.
- value string? - The value of the object.
ebay.listing: ItemDraft
The type that defines the fields for the listing details.
Fields
- categoryId string? - The ID of the leaf category associated with this item. A leaf category is the lowest level in that category and has no children. Note: If you submit both a category ID and an EPID, eBay determines the best category based on the EPID and uses that. The category ID will be ignored.
- condition string? - The enumeration value passed in here sets the condition of the item, such as NEW or USED_EXCELLENT. See ConditionEnum for the full list of supported values. Supported item conditions can vary by eBay category. To see which item conditions are supported for a category, you can use the getItemConditionPolicies method of the Metadata API. Note: The 'Manufacturer Refurbished' item condition is no longer a valid item condition in any eBay marketplace, and to reflect this change, the pre-existing MANUFACTURER_REFURBISHED enumeration value has been replaced by the CERTIFIED_REFURBISHED enumeration value. CR-eligible sellers should make a note to start using CERTIFIED_REFURBISHED from this point forward. To list an item as 'Certified Refurbished', a seller must be pre-qualified by eBay for this feature. Any seller who is not eligible for this feature will be blocked if they try to create a new listing or revise an existing listing with this item condition. Any seller that is interested in eligibility requirements to list with 'Certified Refurbished' should see the Certified refurbished program page in Seller Center. For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/listing/types/api:ConditionEnum'>eBay API documentation</a>
- format string? - The format of the listing. Valid Values: FIXED_PRICE and AUCTION For implementation help, refer to <a href='https://developer.ebay.com/api-docs/sell/listing/types/api:ListingFormatEnum'>eBay API documentation</a>
- pricingSummary PricingSummary? - The type that defines the fields for the price details for an item.
- product Product? - The type that defines the fields for the aspects of a product.
- charity Charity? - This type is used to identify the charitable organization that will receive a percentage of sale proceeds for each sale generated by the listing. This container also includes the donation percentage, which is the percentage of the sale proceeds that the charitable organization will get. In order to receive a percentage of the sales proceeds, the non-profit organization must be registered with the PayPal Giving Fund, which is a partner of eBay for Charity.
ebay.listing: ItemDraftResponse
The type that defines the field for the createItemDraft response.
Fields
- itemDraftId string? - The eBay generated ID of the listing draft.
- sellFlowNativeUri string? - The URI the Partner uses to send the seller to their listing draft that was created on the eBay site. From there the seller can change, update, and publish the item on eBay. This is returned when the seller is using a mobile app.
- sellFlowUrl string? - The web URL the Partner uses to send the seller to the listing draft that was created on the eBay site. From there the seller can change, update, and publish the item on eBay. This is returned when the seller is using mobile web (mweb) or the desktop web. Note: You must construct the URL using the URL returned in this field and a session token. For example: sellFlowUrl?id_token=session_token
ebay.listing: OAuth2RefreshTokenGrantConfig
OAuth2 Refresh Token Grant Configs
Fields
- Fields Included from *OAuth2RefreshTokenGrantConfig
- refreshUrl string(default "https://api.ebay.com/identity/v1/oauth2/token") - Refresh URL
ebay.listing: PricingSummary
The type that defines the fields for the price details for an item.
Fields
- auctionReservePrice Amount? - The type that defines the fields for the currency and a monetary amount.
- auctionStartPrice Amount? - The type that defines the fields for the currency and a monetary amount.
- price Amount? - The type that defines the fields for the currency and a monetary amount.
ebay.listing: Product
The type that defines the fields for the aspects of a product.
Fields
- aspects Aspect[]? - The list of item aspects that describe the item (such as size, color, capacity, model, brand, etc.)
- brand string? - The name brand of the item, such as Nike, Apple, etc.
- description string? - The description of the item that was created by the seller. This field supports plain text or rich content within HTML tags. Note: Active content is not supported. Active content includes animation or video via JavaScript, Flash, plug-ins, or form actions. Max Length: 500,000
- epid string? - An EPID is the eBay product identifier of a product from the eBay product catalog. Note: If you submit both a category ID and an EPID, eBay determines the best category based on the EPID and uses that. The category ID will be ignored.
- imageUrls string[]? - The image URLs of the item. The first URL will be the primary image, which appears on the View Item page in the eBay listing. The URL can be from the following: The eBay Picture Services (images previously uploaded). A server outside of eBay (self-hosted). For more details, see PictureURL and Introduction to Pictures in Listings. Maximum: 12 URLs (for most categories and marketplaces) Restrictions: You cannot mix self-hosted and EPS-hosted URLs in the same listing. All image URLs must be 'https'.
- title string? - The seller-created title of the item. This should include unique characteristics of the item, such as brand, model, color, size, capacity, etc. For example: Levi's 501 size 10 black jeans
ebay.listing: ProxyConfig
Proxy server configurations to be used with the HTTP client endpoint.
Fields
- host string(default "") - Host name of the proxy server
- port int(default 0) - Proxy server port
- userName string(default "") - Proxy server username
- password string(default "") - Proxy server password
Import
import ballerinax/ebay.listing;
Metadata
Released date: over 1 year ago
Version: 1.5.1
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.4.1
GraalVM compatible: Yes
Pull count
Total: 0
Current verison: 0
Weekly downloads
Keywords
Commerce/eCommerce
Cost/Freemium
Contributors
Dependencies