POST api/Contract/Post?customerId={customerId}

Create new contract

Request Information

Parameters

NameDescriptionAdditional information
customerId
The customer's Id

Define this parameter in the request URI.

contract

Define this parameter in the request body.

Request body formats

application/json, text/json

Sample:
{
  "Name": "sample string 1",
  "Description": "sample string 2",
  "Number": "sample string 3",
  "EndDateTime": "2024-03-18T12:06:39.6232158-04:00",
  "StartDateTime": "2024-03-18T12:06:39.6232158-04:00",
  "Agents": [
    1,
    2,
    3
  ]
}

application/xml, text/xml

Sample:
<contract_create_model xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Ticket.Api.Org">
  <Agents xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:long>1</d2p1:long>
    <d2p1:long>2</d2p1:long>
    <d2p1:long>3</d2p1:long>
  </Agents>
  <Description>sample string 2</Description>
  <EndDateTime>2024-03-18T12:06:39.6232158-04:00</EndDateTime>
  <Name>sample string 1</Name>
  <Number>sample string 3</Number>
  <StartDateTime>2024-03-18T12:06:39.6232158-04:00</StartDateTime>
</contract_create_model>

Response Information

Response body formats

application/json, text/json

Sample:
{
  "errors": [],
  "is_valid": true
}

application/xml, text/xml

Sample:
<result xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Ticket.Api">
  <errors />
  <is_valid>true</is_valid>
</result>