Services
- class sp_api.api.Services(marketplace: sp_api.base.marketplaces.Marketplaces = Marketplaces.US, *, refresh_token=None, account='default', credentials=None, restricted_data_token=None)
Services SP-API Client :link:
With the Services API, you can build applications that help service providers get and modify their service orders.
- get_service_job_by_service_job_id(**kwargs)
get_service_job_by_service_job_id(self, serviceJobId, **kwargs) -> ApiResponse
Gets service job details for the service job indicated by the service job identifier you specify.
Usage Plan:
Rate (requests per second) | Burst |—- | —- |20 | 40 |For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.
Args:
serviceJobId:string | * REQUIRED A service job identifier.
- Returns:
ApiResponse:
- cancel_service_job_by_service_job_id(**kwargs)
cancel_service_job_by_service_job_id(self, serviceJobId, **kwargs) -> ApiResponse
Cancels the service job indicated by the service job identifier you specify.
Usage Plan:
Rate (requests per second) | Burst |—- | —- |5 | 20 |For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.
Args:
serviceJobId:string | * REQUIRED An Amazon defined service job identifier.
key cancellationReasonCode:string | * REQUIRED A cancel reason code that specifies the reason for cancelling a service job.
- Returns:
ApiResponse:
- complete_service_job_by_service_job_id(**kwargs)
complete_service_job_by_service_job_id(self, serviceJobId, **kwargs) -> ApiResponse
Completes the service job indicated by the service job identifier you specify.
Usage Plan:
Rate (requests per second) | Burst |—- | —- |5 | 20 |For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.
Args:
serviceJobId:string | * REQUIRED An Amazon defined service job identifier.
- Returns:
ApiResponse:
- get_service_jobs(**kwargs)
get_service_jobs(self, **kwargs) -> ApiResponse
Gets service job details for the specified filter query.
Usage Plan:
Rate (requests per second) | Burst |—- | —- |10 | 40 |For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.
Args:
key serviceOrderIds:array | List of service order ids for the query you want to perform.Max values supported 20.
key serviceJobStatus:array | A list of one or more job status by which to filter the list of jobs.
key pageToken:string | String returned in the response of your previous request.
key pageSize:integer | A non-negative integer that indicates the maximum number of jobs to return in the list, Value must be 1 - 20. Default 20.
key sortField:string | Sort fields on which you want to sort the output.
key sortOrder:string | Sort order for the query you want to perform.
key createdAfter:string | A date used for selecting jobs created after (or at) a specified time must be in ISO 8601 format. Required if LastUpdatedAfter is not specified.Specifying both CreatedAfter and LastUpdatedAfter returns an error.
key createdBefore:string | A date used for selecting jobs created before (or at) a specified time must be in ISO 8601 format.
key lastUpdatedAfter:string | A date used for selecting jobs updated after (or at) a specified time must be in ISO 8601 format. Required if createdAfter is not specified.Specifying both CreatedAfter and LastUpdatedAfter returns an error.
key lastUpdatedBefore:string | A date used for selecting jobs updated before (or at) a specified time must be in ISO 8601 format.
key scheduleStartDate:string | A date used for filtering jobs schedule after (or at) a specified time must be in ISO 8601 format. schedule end date should not be earlier than schedule start date.
key scheduleEndDate:string | A date used for filtering jobs schedule before (or at) a specified time must be in ISO 8601 format. schedule end date should not be earlier than schedule start date.
key marketplaceIds:array | * REQUIRED Used to select jobs that were placed in the specified marketplaces.
- Returns:
ApiResponse:
- add_appointment_for_service_job_by_service_job_id(**kwargs)
add_appointment_for_service_job_by_service_job_id(self, serviceJobId, **kwargs) -> ApiResponse
Adds an appointment to the service job indicated by the service job identifier you specify.
Usage Plan:
Rate (requests per second) | Burst |—- | —- |5 | 20 |For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.
Args:
serviceJobId:string | * REQUIRED An Amazon defined service job identifier.
body: | * REQUIRED {‘description’: ‘Input for add appointment operation.’, ‘properties’: {‘appointmentTime’: {‘$ref’: ‘#/definitions/AppointmentTimeInput’, ‘description’: ‘Input appointment time details.’}}, ‘required’: [‘appointmentTime’], ‘type’: ‘object’}
- Returns:
ApiResponse:
- reschedule_appointment_for_service_job_by_service_job_id(**kwargs)
reschedule_appointment_for_service_job_by_service_job_id(self, serviceJobId, **kwargs) -> ApiResponse
Reschedules an appointment for the service job indicated by the service job identifier you specify.
Usage Plan:
Rate (requests per second) | Burst |—- | —- |5 | 20 |For more information, see “Usage Plans and Rate Limits” in the Selling Partner API documentation.
Args:
serviceJobId:string | * REQUIRED An Amazon defined service job identifier.
appointmentId:string | * REQUIRED An existing appointment identifier for the Service Job.
body: | * REQUIRED {‘description’: ‘Input for rescheduled appointment operation.’,
- ‘properties’: {‘appointmentTime’: {‘$ref’: ‘#/definitions/AppointmentTimeInput’, ‘description’: ‘Input appointment time details.’},
‘rescheduleReasonCode’: {‘$ref’: ‘#/definitions/RescheduleReasonCode’, ‘description’: ‘Input appointment reschedule reason.’}},
‘required’: [‘appointmentTime’, ‘rescheduleReasonCode’], ‘type’: ‘object’}
- Returns:
ApiResponse: