The Get All Offers operation returns all the offers in the system as a list of offer objects
Request
The Get All Offers request may be specified as follows.
Method | Request URI | HTTP Version |
---|---|---|
GET |
|
HTTP/1.1 |
URI Parameters
None.
Request Headers
The following table describes request headers.
Request Header | Description |
---|---|
Authorization |
Specifies the credentials for this request. The value of this header must be set Negotiate <token>. |
Request Body
None.
Response
The response includes an HTTP status code, a set of response headers, and a response body.
Status Code
The status code is embedded in the response for this operation; if successful, it will be status code 200 (OK).
Response Headers
The response for this operation includes the following headers. The response may also include additional standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.
Response Header | Description |
---|---|
None |
None |
Response Body
The format of the response body is as follows:
Copy Code | |
---|---|
[ { "Name": "0CFSRBHFD2GOC3MXGKIL9V4HAIQ512LQKGNYMVCU20GAOTQEPW0SI11OI9SIUMOL", "DisplayName": "45CU8SH4UX93PF7A8YZHHLCBC2V7S4725JFGY6UUZ4LY35KN6VR2M97R2ASF7KL1", "TenantDisplayName": "QD6QQXLM36X7RHP5GA6E19GDFK55KD6V291NWB8E8L7N1RETW0EJ2U9S73KG4RBZ", "State": 0, "InvitationCode": "2H8G0ZLBDESNANJIQHB8MFP7MYOXNPXPSU7V7EOGJPXHQSRO2JYZIOOW2B4LKXYY", "SubscriptionCount": 3317, "ServiceOffers": [ { "ServiceName": "T2VPPBGD", "ServiceOfferSettings": [], "ServiceDisplayName": "DisplayName:T2VPPBGD" } ], "IsValidationRequired": false }, { "Name": "M8AISHGO4E00NI8I9Z9FXGVWFWA2H5EOIK901G80QC2RU7GV5VBSQ8QGLNC6HPH0", "DisplayName": "ZE6PYLUIYU0P44R3MPD23ITQ0QOD40OU5UYOUZ1LPKUG10OFBQI8LUXQUOPI7ROY", "TenantDisplayName": "MNW3MNV6IDEGJZC1PXQ5L3T59MFF3E1HGBH5TA5M5LOL81OQGWRUVU6U4240HPDE", "State": 0, "InvitationCode": "FPUJECHXZ2LRYNZABJCN2RJK7I5FJSP966ALPFA9IUITIF3GZPHXOB8XFJN7IBOG", "SubscriptionCount": 1219, "ServiceOffers": [ { "ServiceName": "T2VPPBGD", "ServiceOfferSettings": [], "ServiceDisplayName": "DisplayName:T2VPPBGD" } ], "IsValidationRequired": false }, { "Name": "9KV9M2P4MZKOZS4DBRYYL8PXFL858P4TGEK1FPHXOJEKUX9PPKMCQ1UA693A5V68", "DisplayName": "UBMD610U4BDFOIPQ7H4UFAZ83VQ6YSDT7PKCOG1MRRA8QP5TPSCZ5Y3UMOKJJD7K", "TenantDisplayName": "OZCJ3UI8KOZDFLXRFFC091156PBDSOPOSH06CL3MYUBIB2OTO5CR05BX9IONTEO7", "State": 0, "InvitationCode": "9TJ08MB1RRDX02RN27QFPOYIX1107QCNUZ07F5WCQMINUFVU87RMW15U6BMHWB5A", "SubscriptionCount": 1191, "ServiceOffers": [ { "ServiceName": "BUB3JP51", "ServiceOfferSettings": [], "ServiceDisplayName": "DisplayName:BUB3JP51" }, { "ServiceName": "P0G9KC52", "ServiceOfferSettings": [], "ServiceDisplayName": "DisplayName:P0G9KC52" }, { "ServiceName": "TNJ28B7P", "ServiceOfferSettings": [], "ServiceDisplayName": "DisplayName:TNJ28B7P" }, { "ServiceName": "N27G7GR9", "ServiceOfferSettings": [], "ServiceDisplayName": "DisplayName:N27G7GR9" }, { "ServiceName": "ZJI7FD3X", "ServiceOfferSettings": [], "ServiceDisplayName": "DisplayName:ZJI7FD3X" }, { "ServiceName": "2ZOSJ4U1", "ServiceOfferSettings": [], "ServiceDisplayName": "DisplayName:2ZOSJ4U1" }, { "ServiceName": "MBFKEB36", "ServiceOfferSettings": [], "ServiceDisplayName": "DisplayName:MBFKEB36" }, { "ServiceName": "FOZ4Q10Z", "ServiceOfferSettings": [], "ServiceDisplayName": "DisplayName:FOZ4Q10Z" }, { "ServiceName": "HKCJK3DT", "ServiceOfferSettings": [], "ServiceDisplayName": "DisplayName:HKCJK3DT" }, { "ServiceName": "QN6JZWRA", "ServiceOfferSettings": [], "ServiceDisplayName": "DisplayName:QN6JZWRA" } ], "IsValidationRequired": false } ] |
The following table describes the key elements of the response body:
Element Name |
Description |
Name |
A name for the offer that is unique. Must use numbers and letters only. |
DisplayName |
The name can be used identify the offer for your tracking purposes. |
TenantDisplayName |
A name for the tenant-side display name |
InvitationCode |
Specifies the invitation code for the offer |
ServiceOffers |
Specifies the service-side offers, if applicable, associated with this offer. Includes the service name, service display name, and service offer settings |
Example
Get all offers.
Copy Code | |
---|---|
public OfferList GetAllOffers(string adminServiceEndpoint) { HttpClient httpClient = new HttpClient(); httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("BASIC", Convert.ToBase64String(UnicodeEncoding.Unicode.GetBytes("AdminPortal:" + ”password”))))); string subscriptionEndpoint = adminServiceEndpoint + "offers/"; var response = httpClient.GetAsync(subscriptionEndpoint); var resultsStr = response.Result.Content.ReadAsStringAsync().Result; var result = JsonConvert.DeserializeObject<OfferList>(resultsStr); //Console.WriteLine(resultsStr); return result; } |