GET api/Returns/{id}

Retrieves the Returns Summary information for the member identified bythe given "id"

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

The MemberNumber of the member for which the data is to be returned

integer

Required

Body Parameters

None.

Response Information

Resource Description

A collection of ReturnData objects, one for each line of return data for the member.

Collection of ReturnData
NameDescriptionTypeAdditional information
Primary_ID

The Member Number

integer

None.

Return_Source

Return Source as follows : M-RET : Retailer Returns OR-RET : Other Retailer Returns C-RET : Retailer Collections PRLF-IDF : PRL

string

None.

Return_Type

Return Type, as follows : RP: "Retailer Purchases" RF: "Retailer Fitted" RO: "Retailer Outputs" RC: "Retailer Collected" ORP: "Retailer Other Retailer" CC: "Collector Collections" PRLR: "PRL Retailer" PRLF: "PRL Producer" ORS: "Other Retailer Sales"

string

None.

Rel_Year

Year the return was made

integer

None.

Rel_Mth

Month the return was made

integer

None.

SecondaryID

Secondary ID code

integer

None.

SecondaryName

Secondary ID Name

string

None.

Description

Description of Stock

string

None.

Tyre_Qty

Quantity

integer

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "Primary_ID": 1,
    "Return_Source": "sample string 2",
    "Return_Type": "sample string 3",
    "Rel_Year": 4,
    "Rel_Mth": 5,
    "SecondaryID": 6,
    "SecondaryName": "sample string 7",
    "Description": "sample string 8",
    "Tyre_Qty": 9
  },
  {
    "Primary_ID": 1,
    "Return_Source": "sample string 2",
    "Return_Type": "sample string 3",
    "Rel_Year": 4,
    "Rel_Mth": 5,
    "SecondaryID": 6,
    "SecondaryName": "sample string 7",
    "Description": "sample string 8",
    "Tyre_Qty": 9
  }
]

application/xml, text/xml

Sample:
<ArrayOfReturnData xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AgriAPI.Models">
  <ReturnData>
    <Description>sample string 8</Description>
    <Primary_ID>1</Primary_ID>
    <Rel_Mth>5</Rel_Mth>
    <Rel_Year>4</Rel_Year>
    <Return_Source>sample string 2</Return_Source>
    <Return_Type>sample string 3</Return_Type>
    <SecondaryID>6</SecondaryID>
    <SecondaryName>sample string 7</SecondaryName>
    <Tyre_Qty>9</Tyre_Qty>
  </ReturnData>
  <ReturnData>
    <Description>sample string 8</Description>
    <Primary_ID>1</Primary_ID>
    <Rel_Mth>5</Rel_Mth>
    <Rel_Year>4</Rel_Year>
    <Return_Source>sample string 2</Return_Source>
    <Return_Type>sample string 3</Return_Type>
    <SecondaryID>6</SecondaryID>
    <SecondaryName>sample string 7</SecondaryName>
    <Tyre_Qty>9</Tyre_Qty>
  </ReturnData>
</ArrayOfReturnData>