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

AgvanceUserIdToAssignSellerSignatureFrom

Agvance user ID to assign to the seller signature

string
SellerSignatureDateSignedToPrint

Date the sellers signature was applied to the contract (only if the signature is valid)

date
SellerSignatureDateTimeSignedUtc

Date and time the sellers signature was captured in UTC (only if the signature is valid)

date
BookSplitAdd

Where the user can add splits to the booking.

Collection of ClsBookSplitAdd

List cannot be empty

FieldPlanId

The field plan unique IDs used in this booking

Collection of integer

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",
  "AgvanceUserIdToAssignSellerSignatureFrom": "sample string 14",
  "SellerSignatureDateSignedToPrint": "2024-12-03T16:50:04.4354149+00:00",
  "SellerSignatureDateTimeSignedUtc": "2024-12-03T16:50:04.4354149+00:00",
  "BookSplitAdd": [
    {
      "CustomerId": "sample string 1",
      "SplitPercent1": 2.1,
      "SplitPercent2": 3.1,
      "SplitPercent3": 4.1,
      "BookPayMethodGuid": "5cac5088-0f60-40b0-8b0d-2fc4e6b48f2a",
      "ContractSigned": true,
      "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": "5cac5088-0f60-40b0-8b0d-2fc4e6b48f2a",
      "ContractSigned": true,
      "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
        }
      ]
    }
  ],
  "FieldPlanId": [
    1,
    2
  ]
}

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>
  <AgvanceUserIdToAssignSellerSignatureFrom>sample string 14</AgvanceUserIdToAssignSellerSignatureFrom>
  <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>5cac5088-0f60-40b0-8b0d-2fc4e6b48f2a</BookPayMethodGuid>
      <ContractSigned>true</ContractSigned>
      <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>5cac5088-0f60-40b0-8b0d-2fc4e6b48f2a</BookPayMethodGuid>
      <ContractSigned>true</ContractSigned>
      <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>
  <FieldPlanId xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </FieldPlanId>
  <LocationId>sample string 1</LocationId>
  <SalespersonId>sample string 5</SalespersonId>
  <SellerSignatureDateSignedToPrint>2024-12-03T16:50:04.4354149+00:00</SellerSignatureDateSignedToPrint>
  <SellerSignatureDateTimeSignedUtc>2024-12-03T16:50:04.4354149+00:00</SellerSignatureDateTimeSignedUtc>
  <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": "28745073-bcee-4787-b1b2-43eb9bf4943e",
      "BookingRecordHeaderDetails": null,
      "BookingRecordSplitDetails": [],
      "BookingRecordLineItemDetails": [],
      "BookingRecordAnalysisDetails": []
    },
    {
      "BookDate": "sample string 1",
      "BookLocation": "sample string 2",
      "BookNumber": "sample string 3",
      "BookGuid": "28745073-bcee-4787-b1b2-43eb9bf4943e",
      "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.