Home
POST/schedule
This method creates a schedule, which is a subscription to the specified schedule template. A schedule periodically generates a report for the feedType specified by the template. Specify the same feedType as the feedType of the associated schedule template. When creating the schedule, if available from the template, you can specify a preferred trigger hour, day of the week, or day of the month. These and other fields are conditionally available as specified by the template.
Note: Make sure to include all fields required by the schedule template (scheduleTemplateId). Call the getScheduleTemplate method (or the getScheduleTemplates method), to find out which fields are required or optional. If a field is optional and a default value is provided by the template, the default value will be used if omitted from the payload.
A successful call returns the location response header containing the getSchedule call URI to retrieve the schedule you just created. The URL includes the eBay-assigned schedule ID, which you can use to reference the schedule task.Note: Except for schedules with a HALF-HOUR frequency, all schedules will ideally run at the start of each hour ('00' minutes). Actual start time may vary time may vary due to load and other factors.
This method is supported in Sandbox environment. To access the endpoint, just replace the api.ebay.com
root URI with api.sandbox.ebay.com
This method has no URI parameters.
All requests made to eBay REST operations require you to provide the Authorization
HTTP header for authentication authorization.
In addition, this method requires you to include the Content-Type header and its value should be set to "application/json". See HTTP request headers- opens rest request components page for details.
This request requires an access token created with the authorization code grant flow, using one or more scopes from the following list (please check your Application Keys page for a list of OAuth scopes available to your application):
https://api.ebay.com/oauth/api_scope/sell.inventory
https://api.ebay.com/oauth/api_scope/sell.fulfillment
https://api.ebay.com/oauth/api_scope/sell.marketing
https://api.ebay.com/oauth/api_scope/commerce.catalog.readonly
https://api.ebay.com/oauth/api_scope/sell.analytics.readonly
See OAuth access tokens for more information.
Input container/field | Type | Description |
---|---|---|
feedType | string | The name of the feed type for the created schedule. Match the feed_type from the schedule template associated with this schedule. Occurrence: Required |
preferredTriggerDayOfMonth | integer | The preferred day of the month to trigger the schedule. This field can be used with preferredTriggerHour for monthly schedules. The last day of the month is used for numbers larger than the actual number of days in the month. Occurrence: Conditional |
preferredTriggerDayOfWeek | DayOfWeekEnum | The preferred day of the week to trigger the schedule. This field can be used with preferredTriggerHour for weekly schedules. Occurrence: Conditional |
preferredTriggerHour | string | The preferred two-digit hour of the day to trigger the schedule. Occurrence: Conditional |
scheduleEndDate | string | The timestamp on which the report generation (subscription) ends. After this date, the schedule status becomes Occurrence: Conditional |
scheduleName | string | The schedule name assigned by the user for the created schedule. Occurrence: Optional |
scheduleStartDate | string | The timestamp to start generating the report. After this timestamp, the schedule status becomes active until either the scheduleEndDate occurs or the scheduleTemplateId becomes inactive. Occurrence: Conditional |
scheduleTemplateId | string | The ID of the template associated with the schedule ID. You can get this ID from the documentation or by calling the getScheduleTemplates method. This method requires a schedule template ID that is Occurrence: Required |
schemaVersion | string | The schema version of the schedule feedType. This field is required if the feedType has a schema version. Occurrence: Conditional |
See HTTP response headers for details.
Header | Meaning |
---|---|
Location | The URL of the schedule, which includes the id. |
This call has no payload.
This call has no field definitions.
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.
Status | Meaning |
---|---|
201 | Created |
400 | Bad Request |
403 | Forbidden |
409 | Conflict |
500 | Internal Server Error |
For more on errors, plus the codes of other common errors, see Handling errors.
Code | Domain | Category | Meaning |
---|---|---|---|
160001 | API_FEED | APPLICATION | There was a problem with an eBay internal system or process. Contact eBay Developer Technical Support for assistance. |
160002 | API_FEED | REQUEST | The authentication scope {scope} is incorrect for 'feed_type' {feedType}. Refer to documentation for details about the scopes. |
160017 | API_FEED | REQUEST | The 'feedType' is missing or invalid. |
160022 | API_FEED | REQUEST | You are not allowed to access this resource. Contact eBay Developer Technical Support for assistance. |
160031 | API_FEED | BUSINESS | You have reached the maximum number of subscribed schedules for the 'feedType' {feedType}. To subscribe to another schedule, you must delete one. |
160032 | API_FEED | REQUEST | The 'scheduleTemplateId' is invalid. Call the getScheduleTemplates method to get the available schedule templates. |
160033 | API_FEED | REQUEST | The 'feedType' is not associated with the 'scheduleTemplateId'. Please provide a 'feedType' that matches the 'scheduleTemplateId'. Call the getScheduleTemplates method to get the available schedule templates. |
160034 | API_FEED | REQUEST | The '{fieldName}' is invalid, missing, or not allowed. |
160035 | API_FEED | BUSINESS | Duplicate schedule (a matching schedule already exists). Use the getSchedules method to see the existing schedules. |
160036 | API_FEED | REQUEST | The '{fieldName}' is in the past. |
160037 | API_FEED | REQUEST | The 'scheduleEndDate' is before 'scheduleStartDate'. |
160040 | API_FEED | BUSINESS | The 'scheduleTemplateId' is inactive. You cannot create or modify a schedule with an inactive 'scheduleTemplateId'. |
This call has no warnings.
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.
This call creates a subscription to the specified schedule template. A schedule returns results for a specified date range at the frequency specified by the template. When creating the schedule, you can also specify a preferred trigger hour, day of the week, or day of the month.
The input is the feedType and scheduleTemplateId, in addition to other parameters required by the configuration (see the specific schedule template for configuration). The following example creates a schedule with the following payload:
My schedule
1*********1
LMS_ORDER_REPORT
10Z
2021-01-01T12Z
123
POSThttps://api.ebay.com/sell/feed/v1/schedule
The output is an HTTP status. If the call is successful, the schedule ID is returned in the Location response header.