GET api/Rep/GetRep/{repCode}/{customerId}/{lastRefreshDate}

Gets the rep details, including rep customers

Request Information

URI Parameters

NameDescriptionTypeAdditional information
repCode

string

Required

customerId

Optional: Get details of specific customer only (0 if not required)

string

Required

lastRefreshDate

Optional: last date that the data set was refreshed (null if date not required)

date

Required

Body Parameters

None.

Response Information

Resource Description

Returns the Rep object

RepViewModel
NameDescriptionTypeAdditional information
rep

Rep

None.

apiResponse

APIResponseMessage

None.

Response Formats

application/json, text/json

Sample:
{
  "rep": {
    "UserId": 1,
    "RepCode": "sample string 2",
    "Name": "sample string 3",
    "Surname": "sample string 4",
    "EmailAddress": "sample string 5",
    "ContactNumber": "sample string 6",
    "AppGuid": "34635a76-7643-4230-ba8b-c8ebd38d5149",
    "customers": [
      {
        "BusinessName": "sample string 1",
        "AccountStatus": "sample string 2",
        "CreditLimit": 3.0,
        "Terms": "sample string 4",
        "AmountDue": 5.0,
        "Balance": 6.0,
        "Current": 7.0,
        "Days30": 8.0,
        "Days60": 9.0,
        "Target": 10.0,
        "Actual": 11.0,
        "Percentage": 12.0,
        "RepCode": "sample string 13",
        "RepName": "sample string 14",
        "RepPhone": "sample string 15",
        "KeystonePhone": "sample string 16"
      },
      {
        "BusinessName": "sample string 1",
        "AccountStatus": "sample string 2",
        "CreditLimit": 3.0,
        "Terms": "sample string 4",
        "AmountDue": 5.0,
        "Balance": 6.0,
        "Current": 7.0,
        "Days30": 8.0,
        "Days60": 9.0,
        "Target": 10.0,
        "Actual": 11.0,
        "Percentage": 12.0,
        "RepCode": "sample string 13",
        "RepName": "sample string 14",
        "RepPhone": "sample string 15",
        "KeystonePhone": "sample string 16"
      }
    ],
    "orders": [
      {
        "orderid": 1,
        "customer_id": "sample string 2",
        "customer_name": "sample string 3",
        "ordernumber": "sample string 4",
        "pickupnotenumber": "sample string 5",
        "shiptolocation": "sample string 6",
        "orderdate": "sample string 7",
        "requireddeliverydate": "sample string 8",
        "comments": "sample string 9",
        "orderedby_repcode": "sample string 10",
        "orderedby_rep": "sample string 11",
        "orderedby_userid": 1,
        "assignuserid": 1,
        "assigngroupid": 1,
        "datecreated": "2024-03-05T10:18:40.7154371+00:00",
        "sTranNo_RMS": "sample string 12",
        "AppGuid": "b6dab0aa-ac2e-41d6-bbf6-334814e7f4cd",
        "orderItems": [
          {
            "itemid": 1,
            "orderid": 1,
            "itemorder_code": "sample string 2",
            "itemorder_description": "sample string 3",
            "bags": "sample string 4",
            "price": 1.0,
            "AppGuid": "ee261aa7-35c1-460b-929d-732845c8b83d"
          },
          {
            "itemid": 1,
            "orderid": 1,
            "itemorder_code": "sample string 2",
            "itemorder_description": "sample string 3",
            "bags": "sample string 4",
            "price": 1.0,
            "AppGuid": "ee261aa7-35c1-460b-929d-732845c8b83d"
          }
        ]
      },
      {
        "orderid": 1,
        "customer_id": "sample string 2",
        "customer_name": "sample string 3",
        "ordernumber": "sample string 4",
        "pickupnotenumber": "sample string 5",
        "shiptolocation": "sample string 6",
        "orderdate": "sample string 7",
        "requireddeliverydate": "sample string 8",
        "comments": "sample string 9",
        "orderedby_repcode": "sample string 10",
        "orderedby_rep": "sample string 11",
        "orderedby_userid": 1,
        "assignuserid": 1,
        "assigngroupid": 1,
        "datecreated": "2024-03-05T10:18:40.7154371+00:00",
        "sTranNo_RMS": "sample string 12",
        "AppGuid": "b6dab0aa-ac2e-41d6-bbf6-334814e7f4cd",
        "orderItems": [
          {
            "itemid": 1,
            "orderid": 1,
            "itemorder_code": "sample string 2",
            "itemorder_description": "sample string 3",
            "bags": "sample string 4",
            "price": 1.0,
            "AppGuid": "ee261aa7-35c1-460b-929d-732845c8b83d"
          },
          {
            "itemid": 1,
            "orderid": 1,
            "itemorder_code": "sample string 2",
            "itemorder_description": "sample string 3",
            "bags": "sample string 4",
            "price": 1.0,
            "AppGuid": "ee261aa7-35c1-460b-929d-732845c8b83d"
          }
        ]
      }
    ]
  },
  "apiResponse": {
    "HttpStatusCode": "sample string 1",
    "ReasonPhrase": "sample string 2",
    "ExceptionMessage": "sample string 3",
    "GeneralMessage": "sample string 4"
  }
}

application/xml, text/xml

Sample:
<RepViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models.Rep">
  <apiResponse xmlns:d2p1="http://schemas.datacontract.org/2004/07/API.Core.Models">
    <d2p1:ExceptionMessage>sample string 3</d2p1:ExceptionMessage>
    <d2p1:GeneralMessage>sample string 4</d2p1:GeneralMessage>
    <d2p1:HttpStatusCode>sample string 1</d2p1:HttpStatusCode>
    <d2p1:ReasonPhrase>sample string 2</d2p1:ReasonPhrase>
  </apiResponse>
  <rep xmlns:d2p1="http://schemas.datacontract.org/2004/07/API.Core.Models.Rep">
    <d2p1:AppGuid>34635a76-7643-4230-ba8b-c8ebd38d5149</d2p1:AppGuid>
    <d2p1:ContactNumber>sample string 6</d2p1:ContactNumber>
    <d2p1:EmailAddress>sample string 5</d2p1:EmailAddress>
    <d2p1:Name>sample string 3</d2p1:Name>
    <d2p1:RepCode>sample string 2</d2p1:RepCode>
    <d2p1:Surname>sample string 4</d2p1:Surname>
    <d2p1:UserId>1</d2p1:UserId>
    <d2p1:customers xmlns:d3p1="http://schemas.datacontract.org/2004/07/API.Core.Models.Customer">
      <d3p1:Customer>
        <d3p1:AccountStatus>sample string 2</d3p1:AccountStatus>
        <d3p1:Actual>11</d3p1:Actual>
        <d3p1:AmountDue>5</d3p1:AmountDue>
        <d3p1:Balance>6</d3p1:Balance>
        <d3p1:BusinessName>sample string 1</d3p1:BusinessName>
        <d3p1:CreditLimit>3</d3p1:CreditLimit>
        <d3p1:Current>7</d3p1:Current>
        <d3p1:Days30>8</d3p1:Days30>
        <d3p1:Days60>9</d3p1:Days60>
        <d3p1:KeystonePhone>sample string 16</d3p1:KeystonePhone>
        <d3p1:Percentage>12</d3p1:Percentage>
        <d3p1:RepCode>sample string 13</d3p1:RepCode>
        <d3p1:RepName>sample string 14</d3p1:RepName>
        <d3p1:RepPhone>sample string 15</d3p1:RepPhone>
        <d3p1:Target>10</d3p1:Target>
        <d3p1:Terms>sample string 4</d3p1:Terms>
      </d3p1:Customer>
      <d3p1:Customer>
        <d3p1:AccountStatus>sample string 2</d3p1:AccountStatus>
        <d3p1:Actual>11</d3p1:Actual>
        <d3p1:AmountDue>5</d3p1:AmountDue>
        <d3p1:Balance>6</d3p1:Balance>
        <d3p1:BusinessName>sample string 1</d3p1:BusinessName>
        <d3p1:CreditLimit>3</d3p1:CreditLimit>
        <d3p1:Current>7</d3p1:Current>
        <d3p1:Days30>8</d3p1:Days30>
        <d3p1:Days60>9</d3p1:Days60>
        <d3p1:KeystonePhone>sample string 16</d3p1:KeystonePhone>
        <d3p1:Percentage>12</d3p1:Percentage>
        <d3p1:RepCode>sample string 13</d3p1:RepCode>
        <d3p1:RepName>sample string 14</d3p1:RepName>
        <d3p1:RepPhone>sample string 15</d3p1:RepPhone>
        <d3p1:Target>10</d3p1:Target>
        <d3p1:Terms>sample string 4</d3p1:Terms>
      </d3p1:Customer>
    </d2p1:customers>
    <d2p1:orders xmlns:d3p1="http://schemas.datacontract.org/2004/07/API.Core.Models.Orders">
      <d3p1:Order>
        <d3p1:AppGuid>b6dab0aa-ac2e-41d6-bbf6-334814e7f4cd</d3p1:AppGuid>
        <d3p1:assigngroupid>1</d3p1:assigngroupid>
        <d3p1:assignuserid>1</d3p1:assignuserid>
        <d3p1:comments>sample string 9</d3p1:comments>
        <d3p1:customer_id>sample string 2</d3p1:customer_id>
        <d3p1:customer_name>sample string 3</d3p1:customer_name>
        <d3p1:datecreated>2024-03-05T10:18:40.7154371+00:00</d3p1:datecreated>
        <d3p1:orderItems>
          <d3p1:OrderItem>
            <d3p1:AppGuid>ee261aa7-35c1-460b-929d-732845c8b83d</d3p1:AppGuid>
            <d3p1:bags>sample string 4</d3p1:bags>
            <d3p1:itemid>1</d3p1:itemid>
            <d3p1:itemorder_code>sample string 2</d3p1:itemorder_code>
            <d3p1:itemorder_description>sample string 3</d3p1:itemorder_description>
            <d3p1:orderid>1</d3p1:orderid>
            <d3p1:price>1</d3p1:price>
          </d3p1:OrderItem>
          <d3p1:OrderItem>
            <d3p1:AppGuid>ee261aa7-35c1-460b-929d-732845c8b83d</d3p1:AppGuid>
            <d3p1:bags>sample string 4</d3p1:bags>
            <d3p1:itemid>1</d3p1:itemid>
            <d3p1:itemorder_code>sample string 2</d3p1:itemorder_code>
            <d3p1:itemorder_description>sample string 3</d3p1:itemorder_description>
            <d3p1:orderid>1</d3p1:orderid>
            <d3p1:price>1</d3p1:price>
          </d3p1:OrderItem>
        </d3p1:orderItems>
        <d3p1:orderdate>sample string 7</d3p1:orderdate>
        <d3p1:orderedby_rep>sample string 11</d3p1:orderedby_rep>
        <d3p1:orderedby_repcode>sample string 10</d3p1:orderedby_repcode>
        <d3p1:orderedby_userid>1</d3p1:orderedby_userid>
        <d3p1:orderid>1</d3p1:orderid>
        <d3p1:ordernumber>sample string 4</d3p1:ordernumber>
        <d3p1:pickupnotenumber>sample string 5</d3p1:pickupnotenumber>
        <d3p1:requireddeliverydate>sample string 8</d3p1:requireddeliverydate>
        <d3p1:sTranNo_RMS>sample string 12</d3p1:sTranNo_RMS>
        <d3p1:shiptolocation>sample string 6</d3p1:shiptolocation>
      </d3p1:Order>
      <d3p1:Order>
        <d3p1:AppGuid>b6dab0aa-ac2e-41d6-bbf6-334814e7f4cd</d3p1:AppGuid>
        <d3p1:assigngroupid>1</d3p1:assigngroupid>
        <d3p1:assignuserid>1</d3p1:assignuserid>
        <d3p1:comments>sample string 9</d3p1:comments>
        <d3p1:customer_id>sample string 2</d3p1:customer_id>
        <d3p1:customer_name>sample string 3</d3p1:customer_name>
        <d3p1:datecreated>2024-03-05T10:18:40.7154371+00:00</d3p1:datecreated>
        <d3p1:orderItems>
          <d3p1:OrderItem>
            <d3p1:AppGuid>ee261aa7-35c1-460b-929d-732845c8b83d</d3p1:AppGuid>
            <d3p1:bags>sample string 4</d3p1:bags>
            <d3p1:itemid>1</d3p1:itemid>
            <d3p1:itemorder_code>sample string 2</d3p1:itemorder_code>
            <d3p1:itemorder_description>sample string 3</d3p1:itemorder_description>
            <d3p1:orderid>1</d3p1:orderid>
            <d3p1:price>1</d3p1:price>
          </d3p1:OrderItem>
          <d3p1:OrderItem>
            <d3p1:AppGuid>ee261aa7-35c1-460b-929d-732845c8b83d</d3p1:AppGuid>
            <d3p1:bags>sample string 4</d3p1:bags>
            <d3p1:itemid>1</d3p1:itemid>
            <d3p1:itemorder_code>sample string 2</d3p1:itemorder_code>
            <d3p1:itemorder_description>sample string 3</d3p1:itemorder_description>
            <d3p1:orderid>1</d3p1:orderid>
            <d3p1:price>1</d3p1:price>
          </d3p1:OrderItem>
        </d3p1:orderItems>
        <d3p1:orderdate>sample string 7</d3p1:orderdate>
        <d3p1:orderedby_rep>sample string 11</d3p1:orderedby_rep>
        <d3p1:orderedby_repcode>sample string 10</d3p1:orderedby_repcode>
        <d3p1:orderedby_userid>1</d3p1:orderedby_userid>
        <d3p1:orderid>1</d3p1:orderid>
        <d3p1:ordernumber>sample string 4</d3p1:ordernumber>
        <d3p1:pickupnotenumber>sample string 5</d3p1:pickupnotenumber>
        <d3p1:requireddeliverydate>sample string 8</d3p1:requireddeliverydate>
        <d3p1:sTranNo_RMS>sample string 12</d3p1:sTranNo_RMS>
        <d3p1:shiptolocation>sample string 6</d3p1:shiptolocation>
      </d3p1:Order>
    </d2p1:orders>
  </rep>
</RepViewModel>