# Partially update an API client

Endpoint: PATCH /apiclients/{apiClientID}
Version: 1.0.457.36910
Security: OAuth2

## Path parameters:

  - `apiClientID` (string, required)
    ID of the api client.

## Request fields (application/json):

  - `ClientSecret` (string)
    Enables the OAuth 2.0 client credentials grant type. Required on all OAuth workflows when present.

  - `AccessTokenDuration` (integer)

  - `Active` (boolean)
    All user authentication is prohibited if false.

  - `AppName` (string)

  - `RefreshTokenDuration` (integer)

  - `AnonymousTokenDuration` (integer)
    Specifies the duration of anonymous tokens, expressed in minutes. This value is only used if the API Client is configured for anonymous shopping.

  - `DefaultContextUserName` (string)
    Optionally define a user that will be used when authenticating with a client credentials grant type flow. This grant type is often used for anonymous browsing on buyer applications and authentication on server integration layers.

  - `xp` (object)
    Example: {}

  - `AllowAnyBuyer` (boolean)
    Allow all buyer users in your organization access to authenticate using this API Client.

  - `AllowAnySupplier` (boolean)
    Allow all supplier users in your organization access to authenticate using this API Client.

  - `AllowSeller` (boolean)
    Allow all marketplace owner users in your organization access to authenticate using this API Client.

  - `IsAnonBuyer` (boolean)
    Enables anonymous shopping when a buyer user is the DefaultContextUser.

  - `OrderCheckoutIntegrationEventID` (string)
    If populated, an error will be thrown when attempting to submit an order that has not been processed through the OrderCheckout integration.

  - `OrderReturnIntegrationEventID` (string)
    If populated, and not overriden by an OrderAdmin, the integration event will be used to calculate ReturnAmount on the order return or each individual return item.

  - `AddToCartIntegrationEventID` (string)
    If populated, the integration event will be used to fetch product information from an external system when a line item is added to an unsubmitted order and the product does not exist in OrderCloud.

  - `MinimumRequiredRoles` (array)
    Enum: "ApiClientAdmin", "ApiClientReader", "AddressAdmin", "AddressReader", "AdminAddressAdmin", "AdminAddressReader", "AdminUserAdmin", "AdminUserGroupAdmin", "AdminUserGroupReader", "AdminUserReader", "ApprovalRuleAdmin", "ApprovalRuleReader", "BulkReader", "BundleAdmin", "BundleAssignmentAdmin", "BundleReader", "BuyerAdmin", "BuyerImpersonation", "BuyerReader", "BuyerUserAdmin", "BuyerUserReader", "CatalogAdmin", "CatalogReader", "CategoryAdmin", "CategoryReader", "CostCenterAdmin", "CostCenterReader", "CreditCardAdmin", "CreditCardReader", "EntitySyncConfigAdmin", "FullAccess", "IncrementorAdmin", "IncrementorReader", "LocaleReader", "LocaleAdmin", "MeAddressAdmin", "MeAdmin", "MeCreditCardAdmin", "MessageConfigAssignmentAdmin", "MeSubscriptionAdmin", "MeXpAdmin", "OrderAdmin", "OrderReader", "OverrideShipping", "OverrideTax", "OverrideUnitPrice", "PasswordReset", "PriceScheduleAdmin", "PriceScheduleReader", "ProductAdmin", "ProductAssignmentAdmin", "ProductCollectionReader", "ProductFacetAdmin", "ProductFacetReader", "ProductReader", "ProductSyncConfigAdmin", "PromotionAdmin", "PromotionReader", "SecurityProfileAdmin", "SecurityProfileReader", "SetSecurityProfile", "ShipmentAdmin", "ShipmentReader", "Shopper", "SpendingAccountAdmin", "SpendingAccountReader", "SubscriptionAdmin", "SubscriptionReader", "SupplierAddressAdmin", "SupplierAddressReader", "SupplierAdmin", "SupplierReader", "SupplierUserAdmin", "SupplierUserGroupAdmin", "SupplierUserGroupReader", "SupplierUserReader", "UnsubmittedOrderReader", "UserGroupAdmin", "UserGroupReader", "OpenIDConnectReader", "OpenIDConnectAdmin", "MessageSenderReader", "MessageSenderAdmin", "XpIndexAdmin", "WebhookReader", "WebhookAdmin", "IntegrationEventReader", "IntegrationEventAdmin", "TrackingEventReader", "TrackingEventAdmin", "DeliveryConfigAdmin", "OrderSyncConfigAdmin", "ErrorConfigAdmin"

  - `MinimumRequiredCustomRoles` (array)
    Example: [""]

  - `MaximumGrantedRoles` (array)
    Enum: same as `MinimumRequiredRoles` (93 values)

  - `MaximumGrantedCustomRoles` (array)
    Example: [""]

## Response 200 fields (application/json):

  - `ID` (string)
    Used for OAuth 2.0 workflows and impersonation.

  - `ClientSecret` (string)
    Enables the OAuth 2.0 client credentials grant type. Required on all OAuth workflows when present.

  - `AccessTokenDuration` (integer)

  - `Active` (boolean)
    All user authentication is prohibited if false.

  - `AppName` (string)

  - `RefreshTokenDuration` (integer)

  - `AnonymousTokenDuration` (integer)
    Specifies the duration of anonymous tokens, expressed in minutes. This value is only used if the API Client is configured for anonymous shopping.

  - `DefaultContextUserName` (string)
    Optionally define a user that will be used when authenticating with a client credentials grant type flow. This grant type is often used for anonymous browsing on buyer applications and authentication on server integration layers.

  - `xp` (object)
    Example: {}

  - `AllowAnyBuyer` (boolean)
    Allow all buyer users in your organization access to authenticate using this API Client.

  - `AllowAnySupplier` (boolean)
    Allow all supplier users in your organization access to authenticate using this API Client.

  - `AllowSeller` (boolean)
    Allow all marketplace owner users in your organization access to authenticate using this API Client.

  - `IsAnonBuyer` (boolean)
    Enables anonymous shopping when a buyer user is the DefaultContextUser.

  - `AssignedBuyerCount` (integer)

  - `AssignedSupplierCount` (integer)

  - `OrderCheckoutIntegrationEventID` (string)
    If populated, an error will be thrown when attempting to submit an order that has not been processed through the OrderCheckout integration.

  - `OrderCheckoutIntegrationEventName` (string)

  - `OrderReturnIntegrationEventID` (string)
    If populated, and not overriden by an OrderAdmin, the integration event will be used to calculate ReturnAmount on the order return or each individual return item.

  - `OrderReturnIntegrationEventName` (string)

  - `AddToCartIntegrationEventID` (string)
    If populated, the integration event will be used to fetch product information from an external system when a line item is added to an unsubmitted order and the product does not exist in OrderCloud.

  - `AddToCartIntegrationEventName` (string)

  - `MinimumRequiredRoles` (array)
    Enum: same as `MinimumRequiredRoles` (93 values)

  - `MinimumRequiredCustomRoles` (array)
    Example: [""]

  - `MaximumGrantedRoles` (array)
    Enum: same as `MinimumRequiredRoles` (93 values)

  - `MaximumGrantedCustomRoles` (array)
    Example: [""]

## Response 4XX fields (application/json):

  - `StatusCode` (integer)
    Example: "404"

  - `ErrorCode` (string)
    Example: "NotFoundError"

  - `Message` (string)
    Example: "Object not found"

  - `Data` (object)
    Example: {"ObjectType":"","ObjectID":""}


