POST api/v1/ROCCollection/newCollection

Record a new collection record.

Request Information

URI Parameters

None.

Body Parameters

Serialized JSON string of collection information

UcoROCCollectionPost
NameDescriptionTypeAdditional information
latitude

decimal number

None.

longitude

decimal number

None.

image

string

None.

verifycode

string

None.

containers

Collection of UcoROCCollectionContainer

None.

emptyROCsSupplied

Collection of UcoROCCollectionEmptyContainer

None.

storeid

globally unique identifier

None.

ucoreceiptnumber

string

None.

datetimeofcollection

date

None.

supervisorid

integer

None.

supervisorname

string

None.

truckrego

string

None.

collectionrequestids

Collection of integer

None.

Request Formats

application/json, text/json

Sample:
{
  "collectionrequestids": [
    1,
    1
  ],
  "latitude": 1.0,
  "longitude": 1.0,
  "image": "sample string 1",
  "verifycode": "sample string 2",
  "containers": [
    {
      "rocnumber": "sample string 1",
      "quantity": 2.0,
      "state": "sample string 3",
      "containertypeid": 4
    },
    {
      "rocnumber": "sample string 1",
      "quantity": 2.0,
      "state": "sample string 3",
      "containertypeid": 4
    }
  ],
  "emptyROCsSupplied": [
    {
      "rocnumber": "sample string 1"
    },
    {
      "rocnumber": "sample string 1"
    }
  ],
  "storeid": "d6d75043-def2-45a4-a350-d9c86b116dba",
  "ucoreceiptnumber": "sample string 4",
  "datetimeofcollection": "2026-08-16T17:16:12.9760871+00:00",
  "supervisorid": 5,
  "supervisorname": "sample string 6",
  "truckrego": "sample string 7"
}

application/xml, text/xml

Sample:
<UcoROCCollectionPost xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/nfuels_api.Models">
  <datetimeofcollection>2026-08-16T17:16:12.9760871+00:00</datetimeofcollection>
  <storeid>d6d75043-def2-45a4-a350-d9c86b116dba</storeid>
  <supervisorid>5</supervisorid>
  <supervisorname>sample string 6</supervisorname>
  <truckrego>sample string 7</truckrego>
  <ucoreceiptnumber>sample string 4</ucoreceiptnumber>
  <collectionrequestids xmlns:d2p1="http://schemas.datacontract.org/2004/07/System">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>1</d2p1:int>
  </collectionrequestids>
  <containers>
    <UcoROCCollectionContainer>
      <containertypeid>4</containertypeid>
      <quantity>2</quantity>
      <rocnumber>sample string 1</rocnumber>
      <state>sample string 3</state>
    </UcoROCCollectionContainer>
    <UcoROCCollectionContainer>
      <containertypeid>4</containertypeid>
      <quantity>2</quantity>
      <rocnumber>sample string 1</rocnumber>
      <state>sample string 3</state>
    </UcoROCCollectionContainer>
  </containers>
  <emptyROCsSupplied>
    <UcoROCCollectionEmptyContainer>
      <rocnumber>sample string 1</rocnumber>
    </UcoROCCollectionEmptyContainer>
    <UcoROCCollectionEmptyContainer>
      <rocnumber>sample string 1</rocnumber>
    </UcoROCCollectionEmptyContainer>
  </emptyROCsSupplied>
  <image>sample string 1</image>
  <latitude>1</latitude>
  <longitude>1</longitude>
  <verifycode>sample string 2</verifycode>
</UcoROCCollectionPost>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

New collection id with blank error message if successful. If failed, collection id is zero with error message filled.

UcoROCCollectionPostResult
NameDescriptionTypeAdditional information
ucocollectionid

integer

None.

errormessage

string

None.

Response Formats

application/json, text/json

Sample:
{
  "ucocollectionid": 1,
  "errormessage": "sample string 2"
}

application/xml, text/xml

Sample:
<UcoROCCollectionPostResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/nfuels_api.Models">
  <errormessage>sample string 2</errormessage>
  <ucocollectionid>1</ucocollectionid>
</UcoROCCollectionPostResult>