@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Feed API
@base https://api.ebay.com/sell/feed/v1
@version v1.3.1
@auth OAuth2
@endpoints 23
@hint download_for_search
@toc order_task(3), inventory_task(3), schedule(6), schedule_template(2), task(6), customer_service_metric_task(3)

@group order_task
@endpoint GET /order_task
@optional {date_range: str, feed_type: str, limit: str, look_back_days: str, offset: str, schedule_id: str}
@returns(200) {href: str, limit: int(int32), next: str, offset: int(int32), prev: str, tasks: [map], total: int(int32)}
@errors {400, 403, 500}

@endpoint POST /order_task
@required {Content-Type: str}
@optional {feedType: str, filterCriteria: map{creationDateRange: map, modifiedDateRange: map, orderStatus: str}, schemaVersion: str}
@returns(202)
@errors {400, 403, 409, 500}

@endpoint GET /order_task/{task_id}
@required {task_id: str}
@returns(200) {completionDate: str, creationDate: str, detailHref: str, feedType: str, filterCriteria: map{creationDateRange: map{from: str, to: str}, modifiedDateRange: map{from: str, to: str}, orderStatus: str}, schemaVersion: str, status: str, taskId: str, uploadSummary: map{failureCount: int(int32), successCount: int(int32)}}
@errors {400, 403, 404, 500}

@endgroup

@group inventory_task
@endpoint GET /inventory_task
@optional {feed_type: str, schedule_id: str, look_back_days: str, date_range: str, limit: str, offset: str}
@returns(200) {href: str, limit: int(int32), next: str, offset: int(int32), prev: str, tasks: [map], total: int(int32)}
@errors {400, 403, 500}

@endpoint POST /inventory_task
@required {Content-Type: str}
@optional {feedType: str, filterCriteria: map{listingFormat: str}, schemaVersion: str}
@returns(202)
@errors {400, 403, 409, 500}

@endpoint GET /inventory_task/{task_id}
@required {task_id: str}
@returns(200) {taskId: str, status: str, feedType: str, creationDate: str, completionDate: str, schemaVersion: str, detailHref: str, uploadSummary: map{failureCount: int(int32), successCount: int(int32)}, filterCriteria: map{listingFormat: str}}
@errors {400, 403, 404, 500}

@endgroup

@group schedule
@endpoint GET /schedule
@required {feed_type: str}
@optional {limit: str, offset: str}
@returns(200) {href: str, limit: int(int32), next: str, offset: int(int32), prev: str, schedules: [map], total: int(int32)}
@errors {400, 403, 500}

@endpoint POST /schedule
@required {Content-Type: str}
@optional {feedType: str, preferredTriggerDayOfMonth: int(int32), preferredTriggerDayOfWeek: str, preferredTriggerHour: str, scheduleEndDate: str, scheduleName: str, scheduleStartDate: str, scheduleTemplateId: str, schemaVersion: str}
@returns(201)
@errors {400, 403, 409, 500}

@endpoint GET /schedule/{schedule_id}
@required {schedule_id: str}
@returns(200) {scheduleId: str, creationDate: str, feedType: str, lastModifiedDate: str, preferredTriggerDayOfMonth: int(int32), preferredTriggerDayOfWeek: str, preferredTriggerHour: str, scheduleEndDate: str, scheduleName: str, scheduleStartDate: str, scheduleTemplateId: str, schemaVersion: str, status: str, statusReason: str}
@errors {400, 403, 404, 500}

@endpoint PUT /schedule/{schedule_id}
@required {schedule_id: str, Content-Type: str}
@optional {preferredTriggerDayOfMonth: int(int32), preferredTriggerDayOfWeek: str, preferredTriggerHour: str, scheduleEndDate: str, scheduleName: str, scheduleStartDate: str, schemaVersion: str}
@returns(204)
@errors {400, 403, 404, 409, 500}

@endpoint DELETE /schedule/{schedule_id}
@required {schedule_id: str}
@returns(204)
@errors {400, 404, 500}

@endpoint GET /schedule/{schedule_id}/download_result_file
@required {schedule_id: str}
@returns(200)
@errors {400, 403, 404, 500}

@endgroup

@group schedule_template
@endpoint GET /schedule_template/{schedule_template_id}
@required {schedule_template_id: str}
@returns(200) {feedType: str, frequency: str, name: str, scheduleTemplateId: str, status: str, supportedConfigurations: [map]}
@errors {400, 404, 500}

@endpoint GET /schedule_template
@required {feed_type: str}
@optional {limit: str, offset: str}
@returns(200) {href: str, limit: int(int32), next: str, offset: int(int32), prev: str, scheduleTemplates: [map], total: int(int32)}
@errors {400, 500}

@endgroup

@group task
@endpoint GET /task
@optional {date_range: str, feed_type: str, limit: str, look_back_days: str, offset: str, schedule_id: str}
@returns(200) {href: str, limit: int(int32), next: str, offset: int(int32), prev: str, tasks: [map], total: int(int32)}
@errors {400, 403, 500}

@endpoint POST /task
@required {X-EBAY-C-MARKETPLACE-ID: str, Content-Type: str}
@optional {Accept-Language: str, feedType: str, schemaVersion: str}
@returns(202)
@errors {400, 403, 409, 500}

@endpoint GET /task/{task_id}/download_input_file
@required {task_id: str}
@returns(200)
@errors {400, 403, 404, 500}

@endpoint GET /task/{task_id}/download_result_file
@required {task_id: str}
@returns(200)
@errors {400, 403, 404, 500}

@endpoint GET /task/{task_id}
@required {task_id: str}
@returns(200) {completionDate: str, creationDate: str, detailHref: str, feedType: str, schemaVersion: str, status: str, taskId: str, uploadSummary: map{failureCount: int(int32), successCount: int(int32)}}
@errors {400, 403, 404, 500}

@endpoint POST /task/{task_id}/upload_file
@required {task_id: str, Content-Type: str}
@returns(200)
@errors {400, 403, 404, 500}

@endgroup

@group customer_service_metric_task
@endpoint GET /customer_service_metric_task
@optional {date_range: str, feed_type: str, limit: str, look_back_days: str, offset: str}
@returns(200) {href: str, limit: int(int32), next: str, offset: int(int32), prev: str, tasks: [map], total: int(int32)}
@errors {400, 403, 500}

@endpoint POST /customer_service_metric_task
@required {Accept-Language: str, Content-Type: str}
@optional {feedType: str, filterCriteria: map{customerServiceMetricType: str, evaluationMarketplaceId: str, listingCategories: [str], shippingRegions: [str]}, schemaVersion: str}
@returns(202)
@errors {400, 403, 500}

@endpoint GET /customer_service_metric_task/{task_id}
@required {task_id: str}
@returns(200) {completionDate: str, creationDate: str, detailHref: str, feedType: str, filterCriteria: map{customerServiceMetricType: str, evaluationMarketplaceId: str, listingCategories: [str], shippingRegions: [str]}, schemaVersion: str, status: str, taskId: str}
@errors {400, 403, 404, 500}

@endgroup

@end
