Skip to content

Latest commit

ย 

History

History
387 lines (270 loc) ยท 17.2 KB

SalesCreditNotesApi.md

File metadata and controls

387 lines (270 loc) ยท 17.2 KB

SynergiTech\Sage\SalesCreditNotesApi

All URIs are relative to https://api.accounting.sage.com/v3.1, except if the operation defines another base path.

Method HTTP request Description
deleteSalesCreditNotesKey() DELETE /sales_credit_notes/{key} Voids a Sales Credit Note
getSalesCreditNotes() GET /sales_credit_notes Returns all Sales Credit Notes
getSalesCreditNotesKey() GET /sales_credit_notes/{key} Returns a Sales Credit Note
postSalesCreditNotes() POST /sales_credit_notes Creates a Sales Credit Note
postSalesCreditNotesKeyRelease() POST /sales_credit_notes/{key}/release Releases a Sales Credit Note
putSalesCreditNotesKey() PUT /sales_credit_notes/{key} Updates a Sales Credit Note

deleteSalesCreditNotesKey()

deleteSalesCreditNotesKey($key, $voidReason): \SynergiTech\Sage\Model\SalesCreditNote

Voids a Sales Credit Note

Endpoint Availability * Accounting Plus: ๐Ÿ‡จ๐Ÿ‡ฆ, ๐Ÿ‡ซ๐Ÿ‡ท, ๐Ÿ‡ฎ๐Ÿ‡ช, ๐Ÿ‡ฌ๐Ÿ‡ง, ๐Ÿ‡บ๐Ÿ‡ธ * Accounting Start: ๐Ÿ‡จ๐Ÿ‡ฆ, ๐Ÿ‡ช๐Ÿ‡ธ, ๐Ÿ‡ซ๐Ÿ‡ท, ๐Ÿ‡ฌ๐Ÿ‡ง, ๐Ÿ‡ฎ๐Ÿ‡ช, ๐Ÿ‡บ๐Ÿ‡ธ ### Access Control Restrictions Requires the authenticated user to have any of the following roles in the area Sales: Full Access

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new SynergiTech\Sage\Api\SalesCreditNotesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$key = 'key_example'; // string | The Sales Credit Note Key.
$voidReason = 'voidReason_example'; // string | The reason the Sales Credit Note is being voided (required unless status is DRAFT).

try {
    $result = $apiInstance->deleteSalesCreditNotesKey($key, $voidReason);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SalesCreditNotesApi->deleteSalesCreditNotesKey: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
key string The Sales Credit Note Key.
voidReason string The reason the Sales Credit Note is being voided (required unless status is DRAFT). [optional]

Return type

\SynergiTech\Sage\Model\SalesCreditNote

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getSalesCreditNotes()

getSalesCreditNotes($showPaymentsAllocations, $search, $contactId, $statusId, $fromDate, $toDate, $updatedOrCreatedSince, $deletedSince, $hasAttachments, $itemsPerPage, $page, $attributes, $sort): \SynergiTech\Sage\Model\SalesCreditNote[]

Returns all Sales Credit Notes

Endpoint Availability * Accounting Plus: ๐Ÿ‡จ๐Ÿ‡ฆ, ๐Ÿ‡ซ๐Ÿ‡ท, ๐Ÿ‡ฎ๐Ÿ‡ช, ๐Ÿ‡ฌ๐Ÿ‡ง, ๐Ÿ‡บ๐Ÿ‡ธ * Accounting Standard: ๐Ÿ‡จ๐Ÿ‡ฆ, ๐Ÿ‡ซ๐Ÿ‡ท, ๐Ÿ‡ฎ๐Ÿ‡ช, ๐Ÿ‡ฌ๐Ÿ‡ง, ๐Ÿ‡บ๐Ÿ‡ธ * Accounting Start: ๐Ÿ‡จ๐Ÿ‡ฆ, ๐Ÿ‡ซ๐Ÿ‡ท, ๐Ÿ‡ฎ๐Ÿ‡ช, ๐Ÿ‡ฌ๐Ÿ‡ง, ๐Ÿ‡บ๐Ÿ‡ธ ### Access Control Restrictions Requires the authenticated user to have any of the following roles in the area Sales: Full Access, Read Only, Restricted Access

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new SynergiTech\Sage\Api\SalesCreditNotesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$showPaymentsAllocations = True; // bool | Use this to show the artefact's payments and allocations
$search = 'search_example'; // string | Use this to filter by the credit note reference or contact name.
$contactId = 'contactId_example'; // string | Use this to filter by contact id
$statusId = 'statusId_example'; // string | Use this to filter by status id
$fromDate = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | Use this to filter by Sales Credit Notes dates
$toDate = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | Use this to filter by Sales Credit Notes dates
$updatedOrCreatedSince = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | Use this to limit the response to Sales Credit Notes changed since a given date (format: YYYY-MM-DDT(+|-)hh:mm) or date-time (format: YYYY-MM-DDThh:mm:ss(+|-)hh:mm). Inclusive of the passed timestamp.
$deletedSince = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | Use this to limit the response to Sales Credit Notes deleted since a given date (format: YYYY-MM-DDT(+|-)hh:mm) or date-time (format: YYYY-MM-DDThh:mm:ss(+|-)hh:mm). Not inclusive of the passed timestamp.
$hasAttachments = True; // bool | Use this to filter Sales Credit Notes by whether they have attachments or not
$itemsPerPage = 20; // int | Returns the given number of Sales Credit Notes per request.
$page = 1; // int | Go to specific page of Sales Credit Notes
$attributes = 'attributes_example'; // string | Specify the attributes that you want to expose for the Sales Credit Notes (expose all attributes with 'all'). These are in addition to the base attributes (name, path)
$sort = 'sort_example'; // string | Order by a given attribute (required) and direction (optional; `asc` or `desc`; defaults to `asc`). Available attributes are: created_at, updated_at, date  Example: `sort=created_at` or `sort=created_at:desc`

try {
    $result = $apiInstance->getSalesCreditNotes($showPaymentsAllocations, $search, $contactId, $statusId, $fromDate, $toDate, $updatedOrCreatedSince, $deletedSince, $hasAttachments, $itemsPerPage, $page, $attributes, $sort);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SalesCreditNotesApi->getSalesCreditNotes: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
showPaymentsAllocations bool Use this to show the artefact's payments and allocations [optional]
search string Use this to filter by the credit note reference or contact name. [optional]
contactId string Use this to filter by contact id [optional]
statusId string Use this to filter by status id [optional]
fromDate \DateTime Use this to filter by Sales Credit Notes dates [optional]
toDate \DateTime Use this to filter by Sales Credit Notes dates [optional]
updatedOrCreatedSince \DateTime Use this to limit the response to Sales Credit Notes changed since a given date (format: YYYY-MM-DDT(+ -)hh:mm) or date-time (format: YYYY-MM-DDThh:mm:ss(+
deletedSince \DateTime Use this to limit the response to Sales Credit Notes deleted since a given date (format: YYYY-MM-DDT(+ -)hh:mm) or date-time (format: YYYY-MM-DDThh:mm:ss(+
hasAttachments bool Use this to filter Sales Credit Notes by whether they have attachments or not [optional]
itemsPerPage int Returns the given number of Sales Credit Notes per request. [optional] [default to 20]
page int Go to specific page of Sales Credit Notes [optional] [default to 1]
attributes string Specify the attributes that you want to expose for the Sales Credit Notes (expose all attributes with 'all'). These are in addition to the base attributes (name, path) [optional]
sort string Order by a given attribute (required) and direction (optional; `asc` or `desc`; defaults to `asc`). Available attributes are: created_at, updated_at, date Example: `sort=created_at` or `sort=created_at:desc` [optional]

Return type

\SynergiTech\Sage\Model\SalesCreditNote[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getSalesCreditNotesKey()

getSalesCreditNotesKey($key, $showPaymentsAllocations, $nestedAttributes, $markAsSent, $showAnalysisTypes, $attributes): \SynergiTech\Sage\Model\SalesCreditNote

Returns a Sales Credit Note

Endpoint Availability * Accounting Plus: ๐Ÿ‡จ๐Ÿ‡ฆ, ๐Ÿ‡ซ๐Ÿ‡ท, ๐Ÿ‡ฎ๐Ÿ‡ช, ๐Ÿ‡ฌ๐Ÿ‡ง, ๐Ÿ‡บ๐Ÿ‡ธ * Accounting Standard: ๐Ÿ‡จ๐Ÿ‡ฆ, ๐Ÿ‡ซ๐Ÿ‡ท, ๐Ÿ‡ฎ๐Ÿ‡ช, ๐Ÿ‡ฌ๐Ÿ‡ง, ๐Ÿ‡บ๐Ÿ‡ธ * Accounting Start: ๐Ÿ‡จ๐Ÿ‡ฆ, ๐Ÿ‡ซ๐Ÿ‡ท, ๐Ÿ‡ฎ๐Ÿ‡ช, ๐Ÿ‡ฌ๐Ÿ‡ง, ๐Ÿ‡บ๐Ÿ‡ธ ### Access Control Restrictions Requires the authenticated user to have any of the following roles in the area Sales: Full Access, Read Only, Restricted Access

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new SynergiTech\Sage\Api\SalesCreditNotesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$key = 'key_example'; // string | The Sales Credit Note Key.
$showPaymentsAllocations = True; // bool | Use this to show the artefact's payments and allocations
$nestedAttributes = 'nestedAttributes_example'; // string | Specify the attributes that you want to expose for nested entities of the Sales Credit Note (expose all nested attributes with 'all'). These are in addition to the base attributes (name, path)
$markAsSent = True; // bool | Use this to mark/not mark the artefact as sent. Defaulted to 'true'.
$showAnalysisTypes = True; // bool | Use this to show the line item analysis types
$attributes = 'attributes_example'; // string | Specify the attributes that you want to expose for the Sales Credit Note (expose all attributes with 'all'). These are in addition to the base attributes (name, path)

try {
    $result = $apiInstance->getSalesCreditNotesKey($key, $showPaymentsAllocations, $nestedAttributes, $markAsSent, $showAnalysisTypes, $attributes);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SalesCreditNotesApi->getSalesCreditNotesKey: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
key string The Sales Credit Note Key.
showPaymentsAllocations bool Use this to show the artefact's payments and allocations [optional]
nestedAttributes string Specify the attributes that you want to expose for nested entities of the Sales Credit Note (expose all nested attributes with 'all'). These are in addition to the base attributes (name, path) [optional]
markAsSent bool Use this to mark/not mark the artefact as sent. Defaulted to 'true'. [optional]
showAnalysisTypes bool Use this to show the line item analysis types [optional]
attributes string Specify the attributes that you want to expose for the Sales Credit Note (expose all attributes with 'all'). These are in addition to the base attributes (name, path) [optional]

Return type

\SynergiTech\Sage\Model\SalesCreditNote

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

postSalesCreditNotes()

postSalesCreditNotes($salesCreditNotes): \SynergiTech\Sage\Model\SalesCreditNote

Creates a Sales Credit Note

Endpoint Availability * Accounting Plus: ๐Ÿ‡จ๐Ÿ‡ฆ, ๐Ÿ‡ซ๐Ÿ‡ท, ๐Ÿ‡ฎ๐Ÿ‡ช, ๐Ÿ‡ฌ๐Ÿ‡ง, ๐Ÿ‡บ๐Ÿ‡ธ * Accounting Start: ๐Ÿ‡จ๐Ÿ‡ฆ, ๐Ÿ‡ช๐Ÿ‡ธ, ๐Ÿ‡ซ๐Ÿ‡ท, ๐Ÿ‡ฌ๐Ÿ‡ง, ๐Ÿ‡ฎ๐Ÿ‡ช, ๐Ÿ‡บ๐Ÿ‡ธ ### Access Control Restrictions Requires the authenticated user to have any of the following roles in the area Sales: Full Access, Restricted Access

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new SynergiTech\Sage\Api\SalesCreditNotesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$salesCreditNotes = new \SynergiTech\Sage\Model\PostSalesCreditNotes(); // \SynergiTech\Sage\Model\PostSalesCreditNotes

try {
    $result = $apiInstance->postSalesCreditNotes($salesCreditNotes);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SalesCreditNotesApi->postSalesCreditNotes: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
salesCreditNotes \SynergiTech\Sage\Model\PostSalesCreditNotes

Return type

\SynergiTech\Sage\Model\SalesCreditNote

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

postSalesCreditNotesKeyRelease()

postSalesCreditNotesKeyRelease($key): \SynergiTech\Sage\Model\SalesCreditNote

Releases a Sales Credit Note

Endpoint Availability * Accounting Plus: ๐Ÿ‡จ๐Ÿ‡ฆ, ๐Ÿ‡ซ๐Ÿ‡ท, ๐Ÿ‡ฎ๐Ÿ‡ช, ๐Ÿ‡ฌ๐Ÿ‡ง, ๐Ÿ‡บ๐Ÿ‡ธ ### Access Control Restrictions Requires the authenticated user to have any of the following roles in the area Sales: Full Access, Restricted Access

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new SynergiTech\Sage\Api\SalesCreditNotesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$key = 'key_example'; // string | The Sales Credit Note Key.

try {
    $result = $apiInstance->postSalesCreditNotesKeyRelease($key);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SalesCreditNotesApi->postSalesCreditNotesKeyRelease: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
key string The Sales Credit Note Key.

Return type

\SynergiTech\Sage\Model\SalesCreditNote

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

putSalesCreditNotesKey()

putSalesCreditNotesKey($key, $salesCreditNotes): \SynergiTech\Sage\Model\SalesCreditNote

Updates a Sales Credit Note

Endpoint Availability * Accounting Plus: ๐Ÿ‡จ๐Ÿ‡ฆ, ๐Ÿ‡ซ๐Ÿ‡ท, ๐Ÿ‡ฎ๐Ÿ‡ช, ๐Ÿ‡ฌ๐Ÿ‡ง, ๐Ÿ‡บ๐Ÿ‡ธ ### Access Control Restrictions Requires the authenticated user to have any of the following roles in the area Sales: Full Access, Restricted Access

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new SynergiTech\Sage\Api\SalesCreditNotesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$key = 'key_example'; // string | The Sales Credit Note Key.
$salesCreditNotes = new \SynergiTech\Sage\Model\PutSalesCreditNotes(); // \SynergiTech\Sage\Model\PutSalesCreditNotes

try {
    $result = $apiInstance->putSalesCreditNotesKey($key, $salesCreditNotes);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SalesCreditNotesApi->putSalesCreditNotesKey: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
key string The Sales Credit Note Key.
salesCreditNotes \SynergiTech\Sage\Model\PutSalesCreditNotes

Return type

\SynergiTech\Sage\Model\SalesCreditNote

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]