List Offers
using StackOneHQ.Client;
using StackOneHQ.Client.Models.Components;
using StackOneHQ.Client.Models.Requests;
using System;
var sdk = new StackOneHQClient(security: new Security() {
Username = "",
Password = "",
});
AtsListOffersRequest req = new AtsListOffersRequest() {
XAccountId = "<id>",
Fields = "id,remote_id,application_id,remote_application_id,start_date,offer_status,salary,currency,created_at,updated_at,offer_history,unified_custom_fields",
Filter = new AtsListOffersFilter() {
UpdatedAfter = System.DateTime.Parse("2020-01-01T00:00:00.000Z"),
},
Prefer = "heartbeat",
};
AtsListOffersResponse? res = await sdk.Ats.Offers.ListAsync(req);
while(res != null)
{
// handle items
res = await res.Next!();
}
| Parameter |
Type |
Required |
Description |
request |
AtsListOffersRequest |
✔️ |
The request object to use for the request. |
AtsListOffersResponse
| Error Type |
Status Code |
Content Type |
| StackOneHQ.Client.Models.Errors.BadRequestResponseException |
400 |
application/json |
| StackOneHQ.Client.Models.Errors.UnauthorizedResponseException |
401 |
application/json |
| StackOneHQ.Client.Models.Errors.ForbiddenResponseException |
403 |
application/json |
| StackOneHQ.Client.Models.Errors.NotFoundResponseException |
404 |
application/json |
| StackOneHQ.Client.Models.Errors.RequestTimedOutResponseException |
408 |
application/json |
| StackOneHQ.Client.Models.Errors.ConflictResponseException |
409 |
application/json |
| StackOneHQ.Client.Models.Errors.PreconditionFailedResponseException |
412 |
application/json |
| StackOneHQ.Client.Models.Errors.UnprocessableEntityResponseException |
422 |
application/json |
| StackOneHQ.Client.Models.Errors.TooManyRequestsResponseException |
429 |
application/json |
| StackOneHQ.Client.Models.Errors.InternalServerErrorResponse |
500 |
application/json |
| StackOneHQ.Client.Models.Errors.NotImplementedResponseException |
501 |
application/json |
| StackOneHQ.Client.Models.Errors.BadGatewayResponseException |
502 |
application/json |
| StackOneHQ.Client.Models.Errors.APIException |
4XX, 5XX |
*/* |
Create Offer
using StackOneHQ.Client;
using StackOneHQ.Client.Models.Components;
using System;
using System.Collections.Generic;
var sdk = new StackOneHQClient(security: new Security() {
Username = "",
Password = "",
});
var res = await sdk.Ats.Offers.CreateAsync(
xAccountId: "<id>",
atsCreateOfferRequestDto: new AtsCreateOfferRequestDto() {
StartDate = System.DateTime.Parse("2021-01-01T01:01:01.000Z"),
OfferStatus = new AtsCreateOfferRequestDtoOfferStatus() {
Value = AtsCreateOfferRequestDtoValue.Pending,
SourceValue = AtsCreateOfferRequestDtoSourceValueUnion.CreateStr(
"Pending"
),
},
OfferHistory = new List<OfferHistory>() {
new OfferHistory() {
StartDate = System.DateTime.Parse("2021-01-01T01:01:01.000Z"),
CreatedAt = System.DateTime.Parse("2021-01-01T01:01:01.000Z"),
UpdatedAt = System.DateTime.Parse("2021-01-01T01:01:01.000Z"),
},
},
Passthrough = new Dictionary<string, object>() {
{ "other_known_names", "John Doe" },
},
},
prefer: "heartbeat"
);
// handle response
| Parameter |
Type |
Required |
Description |
Example |
XAccountId |
string |
✔️ |
The account identifier |
|
AtsCreateOfferRequestDto |
AtsCreateOfferRequestDto |
✔️ |
N/A |
|
Prefer |
string |
➖ |
Set to "heartbeat" to enable keep-alive newline heartbeats during long-running requests. Response includes Preference-Applied: heartbeat header when honored. (RFC 7240) |
heartbeat |
AtsCreateOfferResponse
| Error Type |
Status Code |
Content Type |
| StackOneHQ.Client.Models.Errors.BadRequestResponseException |
400 |
application/json |
| StackOneHQ.Client.Models.Errors.UnauthorizedResponseException |
401 |
application/json |
| StackOneHQ.Client.Models.Errors.ForbiddenResponseException |
403 |
application/json |
| StackOneHQ.Client.Models.Errors.NotFoundResponseException |
404 |
application/json |
| StackOneHQ.Client.Models.Errors.RequestTimedOutResponseException |
408 |
application/json |
| StackOneHQ.Client.Models.Errors.ConflictResponseException |
409 |
application/json |
| StackOneHQ.Client.Models.Errors.PreconditionFailedResponseException |
412 |
application/json |
| StackOneHQ.Client.Models.Errors.UnprocessableEntityResponseException |
422 |
application/json |
| StackOneHQ.Client.Models.Errors.TooManyRequestsResponseException |
429 |
application/json |
| StackOneHQ.Client.Models.Errors.InternalServerErrorResponse |
500 |
application/json |
| StackOneHQ.Client.Models.Errors.NotImplementedResponseException |
501 |
application/json |
| StackOneHQ.Client.Models.Errors.BadGatewayResponseException |
502 |
application/json |
| StackOneHQ.Client.Models.Errors.APIException |
4XX, 5XX |
*/* |
Get Offer
using StackOneHQ.Client;
using StackOneHQ.Client.Models.Components;
using StackOneHQ.Client.Models.Requests;
var sdk = new StackOneHQClient(security: new Security() {
Username = "",
Password = "",
});
AtsGetOfferRequest req = new AtsGetOfferRequest() {
XAccountId = "<id>",
Id = "<id>",
Fields = "id,remote_id,application_id,remote_application_id,start_date,offer_status,salary,currency,created_at,updated_at,offer_history,unified_custom_fields",
Prefer = "heartbeat",
};
var res = await sdk.Ats.Offers.GetAsync(req);
// handle response
| Parameter |
Type |
Required |
Description |
request |
AtsGetOfferRequest |
✔️ |
The request object to use for the request. |
AtsGetOfferResponse
| Error Type |
Status Code |
Content Type |
| StackOneHQ.Client.Models.Errors.BadRequestResponseException |
400 |
application/json |
| StackOneHQ.Client.Models.Errors.UnauthorizedResponseException |
401 |
application/json |
| StackOneHQ.Client.Models.Errors.ForbiddenResponseException |
403 |
application/json |
| StackOneHQ.Client.Models.Errors.NotFoundResponseException |
404 |
application/json |
| StackOneHQ.Client.Models.Errors.RequestTimedOutResponseException |
408 |
application/json |
| StackOneHQ.Client.Models.Errors.ConflictResponseException |
409 |
application/json |
| StackOneHQ.Client.Models.Errors.PreconditionFailedResponseException |
412 |
application/json |
| StackOneHQ.Client.Models.Errors.UnprocessableEntityResponseException |
422 |
application/json |
| StackOneHQ.Client.Models.Errors.TooManyRequestsResponseException |
429 |
application/json |
| StackOneHQ.Client.Models.Errors.InternalServerErrorResponse |
500 |
application/json |
| StackOneHQ.Client.Models.Errors.NotImplementedResponseException |
501 |
application/json |
| StackOneHQ.Client.Models.Errors.BadGatewayResponseException |
502 |
application/json |
| StackOneHQ.Client.Models.Errors.APIException |
4XX, 5XX |
*/* |