All URIs are relative to https://api.businesscentral.dynamics.com/v2.0/sandbox/api/v2.0
Method | HTTP request | Description |
---|---|---|
delete_payment_term | DELETE /companies({company_id})/paymentTerms({paymentTerm_id}) | Deletes an object of type paymentTerm in Dynamics 365 Business Central |
get_payment_term | GET /companies({company_id})/paymentTerms({paymentTerm_id}) | Retrieve the properties and relationships of an object of type paymentTerm for Dynamics 365 Business Central. |
list_payment_terms | GET /companies({company_id})/paymentTerms | Returns a list of paymentTerms |
patch_payment_term | PATCH /companies({company_id})/paymentTerms({paymentTerm_id}) | Updates an object of type paymentTerm in Dynamics 365 Business Central |
post_payment_term | POST /companies({company_id})/paymentTerms | Creates an object of type paymentTerm in Dynamics 365 Business Central |
delete_payment_term(company_id, payment_term_id)
Deletes an object of type paymentTerm in Dynamics 365 Business Central
- OAuth Authentication (oAuth):
import time
import pybusinesscentral
from pybusinesscentral.api import payment_term_api
from pprint import pprint
# Defining the host is optional and defaults to https://api.businesscentral.dynamics.com/v2.0/sandbox/api/v2.0
# See configuration.py for a list of all supported configuration parameters.
configuration = pybusinesscentral.Configuration(
host = "https://api.businesscentral.dynamics.com/v2.0/sandbox/api/v2.0"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure OAuth2 access token for authorization: oAuth
configuration = pybusinesscentral.Configuration(
host = "https://api.businesscentral.dynamics.com/v2.0/sandbox/api/v2.0"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with pybusinesscentral.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = payment_term_api.PaymentTermApi(api_client)
company_id = "company_id_example" # str | (v1.0) id for company
payment_term_id = "paymentTerm_id_example" # str | (v1.0) id for paymentTerm
# example passing only required values which don't have defaults set
try:
# Deletes an object of type paymentTerm in Dynamics 365 Business Central
api_instance.delete_payment_term(company_id, payment_term_id)
except pybusinesscentral.ApiException as e:
print("Exception when calling PaymentTermApi->delete_payment_term: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
company_id | str | (v1.0) id for company | |
payment_term_id | str | (v1.0) id for paymentTerm |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
204 | (v1.0) Succesfully deleted the specified paymentTerm | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaymentTerm get_payment_term(company_id, payment_term_id)
Retrieve the properties and relationships of an object of type paymentTerm for Dynamics 365 Business Central.
- OAuth Authentication (oAuth):
import time
import pybusinesscentral
from pybusinesscentral.api import payment_term_api
from pybusinesscentral.model.payment_term import PaymentTerm
from pprint import pprint
# Defining the host is optional and defaults to https://api.businesscentral.dynamics.com/v2.0/sandbox/api/v2.0
# See configuration.py for a list of all supported configuration parameters.
configuration = pybusinesscentral.Configuration(
host = "https://api.businesscentral.dynamics.com/v2.0/sandbox/api/v2.0"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure OAuth2 access token for authorization: oAuth
configuration = pybusinesscentral.Configuration(
host = "https://api.businesscentral.dynamics.com/v2.0/sandbox/api/v2.0"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with pybusinesscentral.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = payment_term_api.PaymentTermApi(api_client)
company_id = "company_id_example" # str | (v1.0) id for company
payment_term_id = "paymentTerm_id_example" # str | (v1.0) id for paymentTerm
select = [
"id",
] # [str] | (v1.0) Selected properties to be retrieved (optional)
# example passing only required values which don't have defaults set
try:
# Retrieve the properties and relationships of an object of type paymentTerm for Dynamics 365 Business Central.
api_response = api_instance.get_payment_term(company_id, payment_term_id)
pprint(api_response)
except pybusinesscentral.ApiException as e:
print("Exception when calling PaymentTermApi->get_payment_term: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Retrieve the properties and relationships of an object of type paymentTerm for Dynamics 365 Business Central.
api_response = api_instance.get_payment_term(company_id, payment_term_id, select=select)
pprint(api_response)
except pybusinesscentral.ApiException as e:
print("Exception when calling PaymentTermApi->get_payment_term: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
company_id | str | (v1.0) id for company | |
payment_term_id | str | (v1.0) id for paymentTerm | |
select | [str] | (v1.0) Selected properties to be retrieved | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | (v1.0) Succesfully returned the requested paymentTerm | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2007 list_payment_terms(company_id)
Returns a list of paymentTerms
- OAuth Authentication (oAuth):
import time
import pybusinesscentral
from pybusinesscentral.api import payment_term_api
from pybusinesscentral.model.inline_response2007 import InlineResponse2007
from pprint import pprint
# Defining the host is optional and defaults to https://api.businesscentral.dynamics.com/v2.0/sandbox/api/v2.0
# See configuration.py for a list of all supported configuration parameters.
configuration = pybusinesscentral.Configuration(
host = "https://api.businesscentral.dynamics.com/v2.0/sandbox/api/v2.0"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure OAuth2 access token for authorization: oAuth
configuration = pybusinesscentral.Configuration(
host = "https://api.businesscentral.dynamics.com/v2.0/sandbox/api/v2.0"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with pybusinesscentral.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = payment_term_api.PaymentTermApi(api_client)
company_id = "company_id_example" # str | (v1.0) id for company
top = 1 # int | (v1.0) Number of items to return from the top of the list (optional)
skip = 1 # int | (v1.0) Number of items to skip from the list (optional)
limit = 1 # int | (v1.0) Number of items to return from the list (optional)
filter = "$filter_example" # str | (v1.0) Filtering expression (optional)
select = [
"id",
] # [str] | (v1.0) Selected properties to be retrieved (optional)
# example passing only required values which don't have defaults set
try:
# Returns a list of paymentTerms
api_response = api_instance.list_payment_terms(company_id)
pprint(api_response)
except pybusinesscentral.ApiException as e:
print("Exception when calling PaymentTermApi->list_payment_terms: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Returns a list of paymentTerms
api_response = api_instance.list_payment_terms(company_id, top=top, skip=skip, limit=limit, filter=filter, select=select)
pprint(api_response)
except pybusinesscentral.ApiException as e:
print("Exception when calling PaymentTermApi->list_payment_terms: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
company_id | str | (v1.0) id for company | |
top | int | (v1.0) Number of items to return from the top of the list | [optional] |
skip | int | (v1.0) Number of items to skip from the list | [optional] |
limit | int | (v1.0) Number of items to return from the list | [optional] |
filter | str | (v1.0) Filtering expression | [optional] |
select | [str] | (v1.0) Selected properties to be retrieved | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | (v1.0) Succesfully returned a list of paymentTerms | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaymentTerm patch_payment_term(company_id, payment_term_id, content_type, if_match, unknown_base_type)
Updates an object of type paymentTerm in Dynamics 365 Business Central
- OAuth Authentication (oAuth):
import time
import pybusinesscentral
from pybusinesscentral.api import payment_term_api
from pybusinesscentral.model.unknownbasetype import UNKNOWNBASETYPE
from pybusinesscentral.model.payment_term import PaymentTerm
from pprint import pprint
# Defining the host is optional and defaults to https://api.businesscentral.dynamics.com/v2.0/sandbox/api/v2.0
# See configuration.py for a list of all supported configuration parameters.
configuration = pybusinesscentral.Configuration(
host = "https://api.businesscentral.dynamics.com/v2.0/sandbox/api/v2.0"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure OAuth2 access token for authorization: oAuth
configuration = pybusinesscentral.Configuration(
host = "https://api.businesscentral.dynamics.com/v2.0/sandbox/api/v2.0"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with pybusinesscentral.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = payment_term_api.PaymentTermApi(api_client)
company_id = "company_id_example" # str | (v1.0) id for company
payment_term_id = "paymentTerm_id_example" # str | (v1.0) id for paymentTerm
content_type = "Content-Type_example" # str | (v1.0) application/json
if_match = "If-Match_example" # str | (v1.0) Required. When this request header is included and the eTag provided does not match the current tag on the entity, this will not be updated.
unknown_base_type = None # UNKNOWN_BASE_TYPE |
# example passing only required values which don't have defaults set
try:
# Updates an object of type paymentTerm in Dynamics 365 Business Central
api_response = api_instance.patch_payment_term(company_id, payment_term_id, content_type, if_match, unknown_base_type)
pprint(api_response)
except pybusinesscentral.ApiException as e:
print("Exception when calling PaymentTermApi->patch_payment_term: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
company_id | str | (v1.0) id for company | |
payment_term_id | str | (v1.0) id for paymentTerm | |
content_type | str | (v1.0) application/json | |
if_match | str | (v1.0) Required. When this request header is included and the eTag provided does not match the current tag on the entity, this will not be updated. | |
unknown_base_type | UNKNOWN_BASE_TYPE |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | (v1.0) Succesfully updated the specifiedpaymentTerm | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaymentTerm post_payment_term(company_id, content_type, unknown_base_type)
Creates an object of type paymentTerm in Dynamics 365 Business Central
- OAuth Authentication (oAuth):
import time
import pybusinesscentral
from pybusinesscentral.api import payment_term_api
from pybusinesscentral.model.unknownbasetype import UNKNOWNBASETYPE
from pybusinesscentral.model.payment_term import PaymentTerm
from pprint import pprint
# Defining the host is optional and defaults to https://api.businesscentral.dynamics.com/v2.0/sandbox/api/v2.0
# See configuration.py for a list of all supported configuration parameters.
configuration = pybusinesscentral.Configuration(
host = "https://api.businesscentral.dynamics.com/v2.0/sandbox/api/v2.0"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure OAuth2 access token for authorization: oAuth
configuration = pybusinesscentral.Configuration(
host = "https://api.businesscentral.dynamics.com/v2.0/sandbox/api/v2.0"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with pybusinesscentral.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = payment_term_api.PaymentTermApi(api_client)
company_id = "company_id_example" # str | (v1.0) id for company
content_type = "Content-Type_example" # str | (v1.0) application/json
unknown_base_type = None # UNKNOWN_BASE_TYPE |
# example passing only required values which don't have defaults set
try:
# Creates an object of type paymentTerm in Dynamics 365 Business Central
api_response = api_instance.post_payment_term(company_id, content_type, unknown_base_type)
pprint(api_response)
except pybusinesscentral.ApiException as e:
print("Exception when calling PaymentTermApi->post_payment_term: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
company_id | str | (v1.0) id for company | |
content_type | str | (v1.0) application/json | |
unknown_base_type | UNKNOWN_BASE_TYPE |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | (v1.0) A new paymentTerm has been succesfully created | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]