POST api/v{version}/customers/me/servicerequests

Request Information

URI Parameters

NameDescriptionTypeAdditional information
version

string

None.

Body Parameters

CustomerAddServiceRequest
NameDescriptionTypeAdditional information
VehicleId

integer

Required

CategoryId

integer

Required

Services

Collection of CustomerAddServiceRequestItem

Required

Location

GeoLocation

None.

Schedule

Schedule

None.

Type

ServiceRequestType

None.

Business

Used in explicit service request.

Collection of integer

None.

Description

string

String length: inclusive between 0 and 1024

Attachments

Collection of integer

None.

Request Formats

application/json, text/json

Sample:
{
  "VehicleId": 1,
  "CategoryId": 1,
  "Services": [
    {
      "ServiceId": 1,
      "Description": "sample string 1"
    },
    {
      "ServiceId": 1,
      "Description": "sample string 1"
    }
  ],
  "Location": {
    "Lat": 1.1,
    "Lng": 1.1
  },
  "Schedule": {
    "StartDate": 1,
    "EndDate": 1,
    "StartTime": 1,
    "EndTime": 1
  },
  "Type": 1,
  "Business": [
    1,
    2
  ],
  "Description": "sample string 1",
  "Attachments": [
    1,
    2
  ]
}

application/xml, text/xml

Sample:
<CustomerAddServiceRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/FastFixCore.BindingModels">
  <Attachments xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </Attachments>
  <Business xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </Business>
  <Description>sample string 1</Description>
  <Location xmlns:d2p1="http://schemas.datacontract.org/2004/07/FastFixCore.Common">
    <d2p1:Lat>1.1</d2p1:Lat>
    <d2p1:Lng>1.1</d2p1:Lng>
  </Location>
  <Schedule>
    <EndDate>1</EndDate>
    <EndTime>1</EndTime>
    <StartDate>1</StartDate>
    <StartTime>1</StartTime>
  </Schedule>
  <Type>Implicit</Type>
  <CategoryId>1</CategoryId>
  <Services>
    <CustomerAddServiceRequestItem>
      <Description>sample string 1</Description>
      <ServiceId>1</ServiceId>
    </CustomerAddServiceRequestItem>
    <CustomerAddServiceRequestItem>
      <Description>sample string 1</Description>
      <ServiceId>1</ServiceId>
    </CustomerAddServiceRequestItem>
  </Services>
  <VehicleId>1</VehicleId>
</CustomerAddServiceRequest>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'CustomerAddServiceRequest'.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.