Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

Note: This is a work in progress.

This API is used when finally submitting the service request. Some of the service-inventory specific information is submitted to this API.

Important

An API key is required to access this API.

API

Adds a new service activity using the CRSM cloud Web API.

POST - /api/v1/service-activity

Parameters

Parameter

Description

Type

ServiceActivity

The service activity being added.

Request Body

Sample Request Body

{
  "serviceRequestId": 0,
  "locationId": "string",
  "placeOfInspection": "string",
  "comment": "string",
  "tonnage": 0,
  "plannedDateTime": "2021-01-01",
  "actualDateTime": "2021-01-01",
  "requestedDateTime": "2021-01-01",
  "siteContactFirstName": "string",
  "siteContactLastName": "string",
  "siteContactEmail": "string",
  "siteContactPhone": "string",
  "serviceActivityType": 1,
  "locationType": 1
}

Returns

200 - OK

Sample Response Body

{
  "id": 0,
  "serviceRequestId": 0,
  "locationId": "string",
  "placeOfInspection": "string",
  "comment": "string",
  "tonnage": 0,
  "plannedDateTime": "2021-01-01",
  "actualDateTime": "2021-01-01",
  "requestedDateTime": "2021-01-01",
  "siteContactFirstName": "string",
  "siteContactLastName": "string",
  "siteContactEmail": "string",
  "siteContactPhone": "string",
  "status": 0,
  "serviceActivityType": {
    "id": 0,
    "nameEn": "string",
    "nameFr": "string",
    "status": 0
  },
  "locationType": {
    "id": 0,
    "nameEn": "string",
    "nameFr": "string",
    "status": 0
  }
}

400 - Bad Request

Response Body

“Unable to add service activity.”

401 - Unauthorized

If the API key isn’t part of the http headers.

"An Api key wasn't provided."

If the API key is invalid.

"Unauthorized client."

  • No labels