POST Booking/PostBooking

Creates a new Booking.

Request Information

URI Parameters

Body Parameters

Booking object used to create a new Booking.

ClsBookAdd
NameDescriptionTypeAdditional Information
LocationId

The ID of the location where the booking will be created.

string

Required

Max length: 6

BookDate

The date of the booking.

string

Data type: DateTime

Format must be MM/dd/yyyy

CustomerId

The Agvance customer identifier.

string

Max length: 6

FieldId

The Agvance field identifier.

string

Max length: 8

SalespersonId

The Agvance salesperson for the booking.

string

Max length: 15

Comments

Comments.

string

Max length: 80

AdditionalComments

Additional comments.

string

Max length: 240

Term

string

Max length: 15

ControlNumber

An alternative way of identifying the booking.

string

Max length: 15

ExpireDate

The date the booking will expire.

string

Data type: DateTime

Format must be MM/dd/yyyy

StartDate

The date the booking will start.

string

Data type: DateTime

Format must be MM/dd/yyyy

ContractFormat

The format of the booking contract assigned to this transaction

string

Max length: 40

BookSplitAdd

Where the user can add splits to the booking.

Collection of ClsBookSplitAdd

List cannot be empty

Request Formats

application/json, text/json

Sample:
{
  "LocationId": "sample string 1",
  "BookDate": "sample string 2",
  "CustomerId": "sample string 3",
  "FieldId": "sample string 4",
  "SalespersonId": "sample string 5",
  "Comments": "sample string 6",
  "AdditionalComments": "sample string 7",
  "Term": "sample string 8",
  "ControlNumber": "sample string 9",
  "ExpireDate": "sample string 10",
  "StartDate": "sample string 11",
  "ContractFormat": "sample string 13",
  "BookSplitAdd": [
    {
      "CustomerId": "sample string 1",
      "SplitPercent1": 2.1,
      "SplitPercent2": 3.1,
      "SplitPercent3": 4.1,
      "BookPayMethodGuid": "095e6480-d5c7-45aa-a568-44082de10a25",
      "BookDetailAdd": [
        {
          "DepartmentId": "sample string 1",
          "ProductId": "sample string 2",
          "UnitPrice": 3.1,
          "Quantity": 4.1
        },
        {
          "DepartmentId": "sample string 1",
          "ProductId": "sample string 2",
          "UnitPrice": 3.1,
          "Quantity": 4.1
        }
      ]
    },
    {
      "CustomerId": "sample string 1",
      "SplitPercent1": 2.1,
      "SplitPercent2": 3.1,
      "SplitPercent3": 4.1,
      "BookPayMethodGuid": "095e6480-d5c7-45aa-a568-44082de10a25",
      "BookDetailAdd": [
        {
          "DepartmentId": "sample string 1",
          "ProductId": "sample string 2",
          "UnitPrice": 3.1,
          "Quantity": 4.1
        },
        {
          "DepartmentId": "sample string 1",
          "ProductId": "sample string 2",
          "UnitPrice": 3.1,
          "Quantity": 4.1
        }
      ]
    }
  ]
}

application/xml, text/xml

Sample:
<BookAdd xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SSI.AR">
  <AdditionalComments>sample string 7</AdditionalComments>
  <BookDate>sample string 2</BookDate>
  <BookSplitAdd>
    <ClsBookAPI.ClsBookAdd.ClsBookSplitAdd>
      <BookDetailAdd>
        <ClsBookAPI.ClsBookAdd.ClsBookSplitAdd.ClsBookLIAdd>
          <DepartmentId>sample string 1</DepartmentId>
          <ProductId>sample string 2</ProductId>
          <Quantity>4.1</Quantity>
          <UnitPrice>3.1</UnitPrice>
        </ClsBookAPI.ClsBookAdd.ClsBookSplitAdd.ClsBookLIAdd>
        <ClsBookAPI.ClsBookAdd.ClsBookSplitAdd.ClsBookLIAdd>
          <DepartmentId>sample string 1</DepartmentId>
          <ProductId>sample string 2</ProductId>
          <Quantity>4.1</Quantity>
          <UnitPrice>3.1</UnitPrice>
        </ClsBookAPI.ClsBookAdd.ClsBookSplitAdd.ClsBookLIAdd>
      </BookDetailAdd>
      <BookPayMethodGuid>095e6480-d5c7-45aa-a568-44082de10a25</BookPayMethodGuid>
      <CustomerId>sample string 1</CustomerId>
      <SplitPercent1>2.1</SplitPercent1>
      <SplitPercent2>3.1</SplitPercent2>
      <SplitPercent3>4.1</SplitPercent3>
    </ClsBookAPI.ClsBookAdd.ClsBookSplitAdd>
    <ClsBookAPI.ClsBookAdd.ClsBookSplitAdd>
      <BookDetailAdd>
        <ClsBookAPI.ClsBookAdd.ClsBookSplitAdd.ClsBookLIAdd>
          <DepartmentId>sample string 1</DepartmentId>
          <ProductId>sample string 2</ProductId>
          <Quantity>4.1</Quantity>
          <UnitPrice>3.1</UnitPrice>
        </ClsBookAPI.ClsBookAdd.ClsBookSplitAdd.ClsBookLIAdd>
        <ClsBookAPI.ClsBookAdd.ClsBookSplitAdd.ClsBookLIAdd>
          <DepartmentId>sample string 1</DepartmentId>
          <ProductId>sample string 2</ProductId>
          <Quantity>4.1</Quantity>
          <UnitPrice>3.1</UnitPrice>
        </ClsBookAPI.ClsBookAdd.ClsBookSplitAdd.ClsBookLIAdd>
      </BookDetailAdd>
      <BookPayMethodGuid>095e6480-d5c7-45aa-a568-44082de10a25</BookPayMethodGuid>
      <CustomerId>sample string 1</CustomerId>
      <SplitPercent1>2.1</SplitPercent1>
      <SplitPercent2>3.1</SplitPercent2>
      <SplitPercent3>4.1</SplitPercent3>
    </ClsBookAPI.ClsBookAdd.ClsBookSplitAdd>
  </BookSplitAdd>
  <Comments>sample string 6</Comments>
  <ContractFormat>sample string 13</ContractFormat>
  <ControlNumber>sample string 9</ControlNumber>
  <CustomerId>sample string 3</CustomerId>
  <ExpireDate>sample string 10</ExpireDate>
  <FieldId>sample string 4</FieldId>
  <LocationId>sample string 1</LocationId>
  <SalespersonId>sample string 5</SalespersonId>
  <StartDate>sample string 11</StartDate>
  <Term>sample string 8</Term>
</BookAdd>

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 'ClsBookAdd'.

Response Information

Resource Description

Creates a new Booking.

AgvBooking
NameDescriptionTypeAdditional Information
Status

Status of the API call.

string
Message

Message of the API call.

string
ErrorList

List of error messages of the API call.

Collection of string
Count

Count of how many Bookings.

string
BookingRecords

JSON dictionary of BookRecords.

Collection of clsAPIBook

Response Formats

application/json, text/json

Sample:
{
  "Status": "sample string 1",
  "Message": "sample string 2",
  "ErrorList": [
    "sample string 1",
    "sample string 2"
  ],
  "Count": "2",
  "BookingRecords": [
    {
      "BookDate": "sample string 1",
      "BookLocation": "sample string 2",
      "BookNumber": "sample string 3",
      "BookGuid": "5e3df108-7663-4158-aebf-fb7eef17d607",
      "BookingRecordHeaderDetails": null,
      "BookingRecordSplitDetails": [],
      "BookingRecordLineItemDetails": [],
      "BookingRecordAnalysisDetails": []
    },
    {
      "BookDate": "sample string 1",
      "BookLocation": "sample string 2",
      "BookNumber": "sample string 3",
      "BookGuid": "5e3df108-7663-4158-aebf-fb7eef17d607",
      "BookingRecordHeaderDetails": null,
      "BookingRecordSplitDetails": [],
      "BookingRecordLineItemDetails": [],
      "BookingRecordAnalysisDetails": []
    }
  ]
}

application/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'application/xml'. Exception message: Cannot serialize the DataTable. DataTable name is not set.

text/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'text/xml'. Exception message: Cannot serialize the DataTable. DataTable name is not set.