(Accounting.Locations)
- List - List Locations
- Create - Create Location
- Get - Get Location
- Update - Update Location
- Delete - Delete Location
List Locations
using ApideckUnifySdk;
using ApideckUnifySdk.Models.Components;
using ApideckUnifySdk.Models.Requests;
var sdk = new Apideck(
apiKey: "<YOUR_BEARER_TOKEN_HERE>",
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX"
);
AccountingLocationsAllRequest req = new AccountingLocationsAllRequest() {
ServiceId = "salesforce",
Fields = "id,updated_at",
Filter = new AccountingLocationsFilter() {
Subsidiary = "1",
},
};
AccountingLocationsAllResponse? res = await sdk.Accounting.Locations.ListAsync(req);
while(res != null)
{
// handle items
res = await res.Next!();
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
AccountingLocationsAllRequest | ✔️ | The request object to use for the request. |
AccountingLocationsAllResponse
Error Type | Status Code | Content Type |
---|---|---|
ApideckUnifySdk.Models.Errors.BadRequestResponse | 400 | application/json |
ApideckUnifySdk.Models.Errors.UnauthorizedResponse | 401 | application/json |
ApideckUnifySdk.Models.Errors.PaymentRequiredResponse | 402 | application/json |
ApideckUnifySdk.Models.Errors.NotFoundResponse | 404 | application/json |
ApideckUnifySdk.Models.Errors.UnprocessableResponse | 422 | application/json |
ApideckUnifySdk.Models.Errors.APIException | 4XX, 5XX | */* |
Create Location
using ApideckUnifySdk;
using ApideckUnifySdk.Models.Components;
using ApideckUnifySdk.Models.Requests;
using System.Collections.Generic;
var sdk = new Apideck(
apiKey: "<YOUR_BEARER_TOKEN_HERE>",
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX"
);
AccountingLocationsAddRequest req = new AccountingLocationsAddRequest() {
AccountingLocation = new AccountingLocationInput() {
ParentId = "12345",
CompanyName = "SpaceX",
DisplayName = "11 UT - South Jordan",
Status = LocationStatus.Active,
Addresses = new List<Address>() {
new Address() {
Id = "123",
Type = ApideckUnifySdk.Models.Components.Type.Primary,
String = "25 Spring Street, Blackburn, VIC 3130",
Name = "HQ US",
Line1 = "Main street",
Line2 = "apt #",
Line3 = "Suite #",
Line4 = "delivery instructions",
StreetNumber = "25",
City = "San Francisco",
State = "CA",
PostalCode = "94104",
Country = "US",
Latitude = "40.759211",
Longitude = "-73.984638",
County = "Santa Clara",
ContactName = "Elon Musk",
Salutation = "Mr",
PhoneNumber = "111-111-1111",
Fax = "122-111-1111",
Email = "elon@musk.com",
Website = "https://elonmusk.com",
Notes = "Address notes or delivery instructions.",
RowVersion = "1-12345",
},
},
Subsidiaries = new List<SubsidiaryReferenceInput>() {
new SubsidiaryReferenceInput() {
Name = "SpaceX",
},
},
RowVersion = "1-12345",
PassThrough = new List<PassThroughBody>() {
new PassThroughBody() {
ServiceId = "<id>",
ExtendPaths = new List<ExtendPaths>() {
new ExtendPaths() {
Path = "$.nested.property",
Value = new Dictionary<string, object>() {
{ "TaxClassificationRef", new Dictionary<string, object>() {
{ "value", "EUC-99990201-V1-00020000" },
} },
},
},
},
},
},
},
ServiceId = "salesforce",
};
var res = await sdk.Accounting.Locations.CreateAsync(req);
// handle response
Parameter | Type | Required | Description |
---|---|---|---|
request |
AccountingLocationsAddRequest | ✔️ | The request object to use for the request. |
AccountingLocationsAddResponse
Error Type | Status Code | Content Type |
---|---|---|
ApideckUnifySdk.Models.Errors.BadRequestResponse | 400 | application/json |
ApideckUnifySdk.Models.Errors.UnauthorizedResponse | 401 | application/json |
ApideckUnifySdk.Models.Errors.PaymentRequiredResponse | 402 | application/json |
ApideckUnifySdk.Models.Errors.NotFoundResponse | 404 | application/json |
ApideckUnifySdk.Models.Errors.UnprocessableResponse | 422 | application/json |
ApideckUnifySdk.Models.Errors.APIException | 4XX, 5XX | */* |
Get Location
using ApideckUnifySdk;
using ApideckUnifySdk.Models.Components;
using ApideckUnifySdk.Models.Requests;
var sdk = new Apideck(
apiKey: "<YOUR_BEARER_TOKEN_HERE>",
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX"
);
AccountingLocationsOneRequest req = new AccountingLocationsOneRequest() {
Id = "<id>",
ServiceId = "salesforce",
Fields = "id,updated_at",
};
var res = await sdk.Accounting.Locations.GetAsync(req);
// handle response
Parameter | Type | Required | Description |
---|---|---|---|
request |
AccountingLocationsOneRequest | ✔️ | The request object to use for the request. |
AccountingLocationsOneResponse
Error Type | Status Code | Content Type |
---|---|---|
ApideckUnifySdk.Models.Errors.BadRequestResponse | 400 | application/json |
ApideckUnifySdk.Models.Errors.UnauthorizedResponse | 401 | application/json |
ApideckUnifySdk.Models.Errors.PaymentRequiredResponse | 402 | application/json |
ApideckUnifySdk.Models.Errors.NotFoundResponse | 404 | application/json |
ApideckUnifySdk.Models.Errors.UnprocessableResponse | 422 | application/json |
ApideckUnifySdk.Models.Errors.APIException | 4XX, 5XX | */* |
Update Location
using ApideckUnifySdk;
using ApideckUnifySdk.Models.Components;
using ApideckUnifySdk.Models.Requests;
using System.Collections.Generic;
var sdk = new Apideck(
apiKey: "<YOUR_BEARER_TOKEN_HERE>",
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX"
);
AccountingLocationsUpdateRequest req = new AccountingLocationsUpdateRequest() {
Id = "<id>",
AccountingLocation = new AccountingLocationInput() {
ParentId = "12345",
CompanyName = "SpaceX",
DisplayName = "11 UT - South Jordan",
Status = LocationStatus.Active,
Addresses = new List<Address>() {
new Address() {
Id = "123",
Type = ApideckUnifySdk.Models.Components.Type.Primary,
String = "25 Spring Street, Blackburn, VIC 3130",
Name = "HQ US",
Line1 = "Main street",
Line2 = "apt #",
Line3 = "Suite #",
Line4 = "delivery instructions",
StreetNumber = "25",
City = "San Francisco",
State = "CA",
PostalCode = "94104",
Country = "US",
Latitude = "40.759211",
Longitude = "-73.984638",
County = "Santa Clara",
ContactName = "Elon Musk",
Salutation = "Mr",
PhoneNumber = "111-111-1111",
Fax = "122-111-1111",
Email = "elon@musk.com",
Website = "https://elonmusk.com",
Notes = "Address notes or delivery instructions.",
RowVersion = "1-12345",
},
},
Subsidiaries = new List<SubsidiaryReferenceInput>() {
new SubsidiaryReferenceInput() {
Name = "SpaceX",
},
},
RowVersion = "1-12345",
PassThrough = new List<PassThroughBody>() {
new PassThroughBody() {
ServiceId = "<id>",
ExtendPaths = new List<ExtendPaths>() {
new ExtendPaths() {
Path = "$.nested.property",
Value = new Dictionary<string, object>() {
{ "TaxClassificationRef", new Dictionary<string, object>() {
{ "value", "EUC-99990201-V1-00020000" },
} },
},
},
},
},
},
},
ServiceId = "salesforce",
};
var res = await sdk.Accounting.Locations.UpdateAsync(req);
// handle response
Parameter | Type | Required | Description |
---|---|---|---|
request |
AccountingLocationsUpdateRequest | ✔️ | The request object to use for the request. |
AccountingLocationsUpdateResponse
Error Type | Status Code | Content Type |
---|---|---|
ApideckUnifySdk.Models.Errors.BadRequestResponse | 400 | application/json |
ApideckUnifySdk.Models.Errors.UnauthorizedResponse | 401 | application/json |
ApideckUnifySdk.Models.Errors.PaymentRequiredResponse | 402 | application/json |
ApideckUnifySdk.Models.Errors.NotFoundResponse | 404 | application/json |
ApideckUnifySdk.Models.Errors.UnprocessableResponse | 422 | application/json |
ApideckUnifySdk.Models.Errors.APIException | 4XX, 5XX | */* |
Delete Location
using ApideckUnifySdk;
using ApideckUnifySdk.Models.Components;
using ApideckUnifySdk.Models.Requests;
var sdk = new Apideck(
apiKey: "<YOUR_BEARER_TOKEN_HERE>",
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX"
);
AccountingLocationsDeleteRequest req = new AccountingLocationsDeleteRequest() {
Id = "<id>",
ServiceId = "salesforce",
};
var res = await sdk.Accounting.Locations.DeleteAsync(req);
// handle response
Parameter | Type | Required | Description |
---|---|---|---|
request |
AccountingLocationsDeleteRequest | ✔️ | The request object to use for the request. |
AccountingLocationsDeleteResponse
Error Type | Status Code | Content Type |
---|---|---|
ApideckUnifySdk.Models.Errors.BadRequestResponse | 400 | application/json |
ApideckUnifySdk.Models.Errors.UnauthorizedResponse | 401 | application/json |
ApideckUnifySdk.Models.Errors.PaymentRequiredResponse | 402 | application/json |
ApideckUnifySdk.Models.Errors.NotFoundResponse | 404 | application/json |
ApideckUnifySdk.Models.Errors.UnprocessableResponse | 422 | application/json |
ApideckUnifySdk.Models.Errors.APIException | 4XX, 5XX | */* |