diff --git a/api-versions.txt b/api-versions.txt index b887f102..22821f62 100644 --- a/api-versions.txt +++ b/api-versions.txt @@ -1,16 +1,18 @@ -shopper-baskets-oas-v1=1.9.4 -shopper-baskets-oas-v2=2.3.3 -shopper-configurations-oas-v1=1.0.2 +# APIs for ECOM v26.3 +# Formally Shopper Login +auth-oas-v1=1.46.0 +shopper-baskets-oas-v1=1.11.0 +shopper-baskets-oas-v2=2.5.1 +shopper-configurations-oas-v1=1.2.0 shopper-consents-oas-v1=1.1.4 shopper-context-oas-v1=1.1.3 -shopper-customers-oas-v1=1.3.2 -shopper-experience-oas-v1=1.1.2 -shopper-gift-certificates-oas-v1=1.0.29 -shopper-login-oas-v1=1.42.2 -shopper-orders-oas-v1=1.10.0 -shopper-payments-oas-v1=1.2.3 -shopper-products-oas-v1=1.1.3 -shopper-promotions-oas-v1=1.0.39 -shopper-search-oas-v1=1.5.4 +shopper-customers-oas-v1=1.6.1 +shopper-experience-oas-v1=1.2.1 +shopper-gift-certificates-oas-v1=1.2.0 +shopper-orders-oas-v1=1.12.1 +shopper-payments-oas-v1=1.4.0 +shopper-products-oas-v1=1.3.0 +shopper-promotions-oas-v1=1.2.0 +shopper-search-oas-v1=1.8.0 shopper-seo-oas-v1=1.0.17 -shopper-stores-oas-v1=1.0.19 +shopper-stores-oas-v1=1.2.0 diff --git a/apis/shopper-login-oas-1.43.0/shopper-login-oas-v1-public.yaml b/apis/auth-oas-1.46.0/auth-oas-v1-public.yaml similarity index 84% rename from apis/shopper-login-oas-1.43.0/shopper-login-oas-v1-public.yaml rename to apis/auth-oas-1.46.0/auth-oas-v1-public.yaml index 82b12fa3..09226210 100644 --- a/apis/shopper-login-oas-1.43.0/shopper-login-oas-v1-public.yaml +++ b/apis/auth-oas-1.46.0/auth-oas-v1-public.yaml @@ -2,10 +2,10 @@ openapi: 3.0.3 info: x-api-type: Shopper x-api-family: Shopper - title: Shopper Login - version: 1.43.0 + title: Auth + version: 1.46.0 description: |- - [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-login/shopper-login-oas-v1-public.yaml) + [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/auth/auth-oas-v1-public.yaml) # API Overview @@ -742,7 +742,7 @@ paths: - $ref: '#/components/parameters/organizationId' - name: Authorization in: header - description: "Base64-encoded string for HTTP Basic authentication. The string is composed of a client ID and client secret, separated by a colon (`:`), for example: `clientId:clientSecret`. \nRequired unless the grant type is `authorization_code_pkce`." + description: "Base64-encoded string for HTTP Basic authentication. The string is composed of a client ID and client secret, separated by a colon (`:`), for example: `clientId:clientSecret`. \nNot required if the grant type is `authorization_code_pkce` or `refresh_token`." required: false schema: type: string @@ -1065,7 +1065,7 @@ paths: - $ref: '#/components/parameters/organizationId' - name: Authorization in: header - description: "Base64-encoded string for HTTP Basic authentication. The string is composed of a client ID and client secret, separated by a colon (`:`), for example: `clientId:clientSecret`. \nRequired unless the grant type is `authorization_code_pkce`." + description: "Base64-encoded string for HTTP Basic authentication. The string is composed of a client ID and client secret, separated by a colon (`:`), for example: `clientId:clientSecret`. \nNot required if the grant type is `authorization_code_pkce` or `refresh_token`." required: false schema: type: string @@ -2236,7 +2236,7 @@ paths: /organizations/{organizationId}/oauth2/webauthn/register/authorize: post: summary: Authorize user for WebAuthn registration - description: "Authorizes a user to register a WebAuthn credential (passkey). This endpoint validates the user's \ncredentials and creates a password action token that can be used to start the registration process.\nThe token is sent to the user via the specified channel (email or SMS).\n" + description: "Authorizes a user to register a WebAuthn credential (passkey). This endpoint validates the user's \ncredentials and creates a password action token that can be used to start the registration process.\nThe token is sent to the user via the specified channel (email or SMS).\n\nThe SLAS client must have the `sfcc.pwdless_login` scope to access this endpoint." operationId: authorizeWebauthnRegistration parameters: - $ref: '#/components/parameters/organizationId' @@ -2280,6 +2280,8 @@ paths: description: | Starts the WebAuthn registration process by generating credential creation options. Returns the challenge and other parameters needed by the authenticator to create a new credential. + + The SLAS client must have the `sfcc.pwdless_login` scope to access this endpoint. operationId: startWebauthnUserRegistration parameters: - $ref: '#/components/parameters/organizationId' @@ -2339,6 +2341,8 @@ paths: description: | Completes the WebAuthn registration process by verifying the credential created by the authenticator. Stores the public key and credential information for future authentication. + + The SLAS client must have the `sfcc.pwdless_login` scope to access this endpoint. operationId: finishWebauthnUserRegistration parameters: - $ref: '#/components/parameters/organizationId' @@ -2372,49 +2376,597 @@ paths: content: application/problem+json: schema: - $ref: '#/components/schemas/Oauth2ErrorResponse' - examples: - Unauthorized401: - $ref: '#/components/examples/InvalidClient401' - /organizations/{organizationId}/oauth2/webauthn/authenticate/start: - post: - summary: Start WebAuthn authentication - description: | - Starts the WebAuthn authentication process by generating credential request options. - Returns the challenge and allowed credentials for the user to authenticate with. - operationId: startWebauthnAuthentication + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + Unauthorized401: + $ref: '#/components/examples/InvalidClient401' + /organizations/{organizationId}/oauth2/webauthn/authenticate/start: + post: + summary: Start WebAuthn authentication + description: | + Starts the WebAuthn authentication process by generating credential request options. + Returns the challenge and allowed credentials for the user to authenticate with. + + The SLAS client must have the `sfcc.pwdless_login` scope to access this endpoint. + operationId: startWebauthnAuthentication + parameters: + - $ref: '#/components/parameters/organizationId' + - name: Authorization + in: header + description: 'Base64-encoded string for HTTP Basic authentication. The string is composed of a client ID and client secret, separated by a colon (`:`). For example: `clientId:clientSecret`.' + required: false + schema: + type: string + example: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW + requestBody: + required: true + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AuthenticateRequest' + examples: + authenticateRequest: + value: + tenant_id: zzte_053 + client_id: 12345678-1234-1234-1234-123456789012 + channel_id: RefArch + user_id: user@example.com + responses: + '200': + description: Authentication options successfully generated + content: + application/json: + schema: + $ref: '#/components/schemas/PublicKeyCredentialRequestOptions' + examples: + webauthnAuthenticationStartSuccess: + $ref: '#/components/examples/webauthnAuthenticationStartSuccess' + '400': + description: Bad request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + BadOrMissingClientId400: + $ref: '#/components/examples/BadOrMissingClientId400' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + Unauthorized401: + $ref: '#/components/examples/InvalidClient401' + '404': + description: Not Found + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + UserNotFound404: + $ref: '#/components/examples/UserNotFound404' + /organizations/{organizationId}/oauth2/webauthn/authenticate/finish: + post: + summary: Finish WebAuthn authentication + description: | + Completes the WebAuthn authentication process by verifying the assertion from the authenticator. + Returns OAuth tokens upon successful authentication. + + The SLAS client must have the `sfcc.pwdless_login` scope to access this endpoint. + operationId: finishWebauthnAuthentication + parameters: + - $ref: '#/components/parameters/organizationId' + - name: Authorization + in: header + description: 'Base64-encoded string for HTTP Basic authentication. The string is composed of a client ID and client secret, separated by a colon (`:`). For example: `clientId:clientSecret`.' + required: false + schema: + type: string + example: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AuthenticateFinishRequest' + responses: + '200': + description: Authentication successful + content: + application/json: + schema: + $ref: '#/components/schemas/AuthenticateResult' + examples: + webauthnAuthenticationFinishSuccess: + $ref: '#/components/examples/webauthnAuthenticationFinishSuccess' + '400': + description: Bad request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + BadOrMissingClientId400: + $ref: '#/components/examples/BadOrMissingClientId400' + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + Unauthorized401: + $ref: '#/components/examples/InvalidClient401' + /organizations/{organizationId}/oauth2/webauthn/passkey/user/{loginId}: + get: + summary: Retrieve passkey user information and credentials by login ID + description: "This endpoint retrieves a user's WebAuthn passkey information including all associated credentials. \nIt returns the user's profile information along with a list of all registered passkey credentials.\n\nThe SLAS client must have the `sfcc.pwdless_login` scope to access this endpoint.\n\nThis endpoint requires Shopper JWT authentication. " + operationId: getPasskeyUserByLoginId + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/channel_id' + - name: loginId + in: path + description: The login ID (username) of the user whose passkey information is being retrieved + required: true + schema: + type: string + minLength: 1 + maxLength: 256 + example: user@example.com + - name: Authorization + in: header + description: Shopper JWT access token + required: true + schema: + type: string + minLength: 1 + maxLength: 4096 + example: Bearer eyJ2ZXIiOiIxLjAiLCJraWQiOiI0ZTQyNTFkOS0zM2Y2LTRjMTMtYjZmZC1mOWJkNTJmYTZhNDciLCJ0eXAiOiJqd3QiLCJjbHYiOiJKMi4xLjAiLCJhbGciOiJFUzI1NiJ9... + responses: + '200': + description: The passkey user information and credentials were retrieved successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/PasskeyUser' + examples: + getPasskeyUserByLoginIdSuccess: + $ref: '#/components/examples/getPasskeyUserByLoginIdSuccess' + headers: + X-RateLimit-1M-Limit: + description: The 1 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-1M-Remaining: + description: The 1 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-1M-Reset: + description: The 1 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + X-RateLimit-5M-Limit: + description: The 5 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-5M-Remaining: + description: The 5 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-5M-Reset: + description: The 5 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + '400': + description: Bad request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + BadOrMissingLoginId400: + value: + error: invalid_request + error_description: The login ID is missing or invalid. + headers: + X-RateLimit-1M-Limit: + description: The 1 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-1M-Remaining: + description: The 1 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-1M-Reset: + description: The 1 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + X-RateLimit-5M-Limit: + description: The 5 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-5M-Remaining: + description: The 5 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-5M-Reset: + description: The 5 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + Unauthorized401: + $ref: '#/components/examples/InvalidClient401' + headers: + X-RateLimit-1M-Limit: + description: The 1 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-1M-Remaining: + description: The 1 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-1M-Reset: + description: The 1 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + X-RateLimit-5M-Limit: + description: The 5 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-5M-Remaining: + description: The 5 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-5M-Reset: + description: The 5 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + '403': + description: Forbidden - token validation failed + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + TokenMismatch403: + value: + error: forbidden + error_description: The loginId, organizationId, or channel_id in the token does not match the request parameters. + headers: + X-RateLimit-1M-Limit: + description: The 1 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-1M-Remaining: + description: The 1 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-1M-Reset: + description: The 1 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + X-RateLimit-5M-Limit: + description: The 5 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-5M-Remaining: + description: The 5 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-5M-Reset: + description: The 5 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + '404': + description: Not found + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + PasskeyUserNotFound404: + value: + error: not_found + error_description: No passkey user found with the provided login ID. + headers: + X-RateLimit-1M-Limit: + description: The 1 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-1M-Remaining: + description: The 1 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-1M-Reset: + description: The 1 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + X-RateLimit-5M-Limit: + description: The 5 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-5M-Remaining: + description: The 5 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-5M-Reset: + description: The 5 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + security: + - ShopperToken: + - sfcc.pwdless_login + delete: + summary: Delete passkey user and all associated credentials + description: "This endpoint deletes a user's WebAuthn passkey information and all associated credentials.\nThe endpoint validates the Shopper JWT signature and ensures that the loginId, organizationId, \nand channel_id in the token match the values in the path and query parameters.\n\nThe SLAS client must have the `sfcc.pwdless_login` scope to access this endpoint.\n\nThis endpoint requires Shopper JWT authentication. " + operationId: deletePasskeyUser + parameters: + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/channel_id' + - name: loginId + in: path + description: The login ID (username) of the user whose passkey information is being deleted + required: true + schema: + type: string + minLength: 1 + maxLength: 256 + example: user@example.com + - name: Authorization + in: header + description: Shopper JWT access token + required: true + schema: + type: string + minLength: 1 + maxLength: 4096 + example: Bearer eyJ2ZXIiOiIxLjAiLCJraWQiOiI0ZTQyNTFkOS0zM2Y2LTRjMTMtYjZmZC1mOWJkNTJmYTZhNDciLCJ0eXAiOiJqd3QiLCJjbHYiOiJKMi4xLjAiLCJhbGciOiJFUzI1NiJ5... + responses: + '204': + description: The passkey user and all credentials were deleted successfully. + headers: + X-RateLimit-1M-Limit: + description: The 1 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-1M-Remaining: + description: The 1 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-1M-Reset: + description: The 1 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + X-RateLimit-5M-Limit: + description: The 5 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-5M-Remaining: + description: The 5 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-5M-Reset: + description: The 5 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + '400': + description: Bad request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + BadOrMissingLoginId400: + value: + error: invalid_request + error_description: The login ID is missing or invalid. + headers: + X-RateLimit-1M-Limit: + description: The 1 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-1M-Remaining: + description: The 1 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-1M-Reset: + description: The 1 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + X-RateLimit-5M-Limit: + description: The 5 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-5M-Remaining: + description: The 5 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-5M-Reset: + description: The 5 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + '401': + description: Unauthorized + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + Unauthorized401: + $ref: '#/components/examples/InvalidClient401' + headers: + X-RateLimit-1M-Limit: + description: The 1 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-1M-Remaining: + description: The 1 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-1M-Reset: + description: The 1 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + X-RateLimit-5M-Limit: + description: The 5 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-5M-Remaining: + description: The 5 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-5M-Reset: + description: The 5 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + '403': + description: Forbidden - token validation failed + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + TokenMismatch403: + value: + error: forbidden + error_description: The loginId, organizationId, or channel_id in the token does not match the request parameters. + headers: + X-RateLimit-1M-Limit: + description: The 1 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-1M-Remaining: + description: The 1 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-1M-Reset: + description: The 1 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + X-RateLimit-5M-Limit: + description: The 5 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-5M-Remaining: + description: The 5 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-5M-Reset: + description: The 5 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + '404': + description: Not found + content: + application/problem+json: + schema: + $ref: '#/components/schemas/Oauth2ErrorResponse' + examples: + PasskeyUserNotFound404: + value: + error: not_found + error_description: No passkey user found with the provided login ID. + headers: + X-RateLimit-1M-Limit: + description: The 1 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-1M-Remaining: + description: The 1 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-1M-Reset: + description: The 1 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + X-RateLimit-5M-Limit: + description: The 5 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-5M-Remaining: + description: The 5 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-5M-Reset: + description: The 5 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + security: + - ShopperToken: + - sfcc.pwdless_login + /organizations/{organizationId}/oauth2/webauthn/passkey/user/{loginId}/credentials/{credentialId}: + delete: + summary: Delete a specific passkey credential + description: "This endpoint deletes a specific WebAuthn passkey credential for a user.\nThe endpoint validates the Shopper JWT signature and ensures that the loginId, organizationId, \nand channel_id in the token match the values in the path and query parameters.\n\nThe SLAS client must have the `sfcc.pwdless_login` scope to access this endpoint.\n\nThis endpoint requires Shopper JWT authentication. " + operationId: deletePasskeyCredential parameters: - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/channel_id' + - name: loginId + in: path + description: The login ID (username) of the user whose passkey credential is being deleted + required: true + schema: + type: string + minLength: 1 + maxLength: 256 + example: user@example.com + - name: credentialId + in: path + description: The unique identifier of the credential to delete + required: true + schema: + type: string + minLength: 1 + maxLength: 1024 + example: Y3JlZGVudGlhbElkMTIz - name: Authorization in: header - description: 'Base64-encoded string for HTTP Basic authentication. The string is composed of a client ID and client secret, separated by a colon (`:`). For example: `clientId:clientSecret`.' - required: false + description: Shopper JWT access token + required: true schema: type: string - example: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW - requestBody: - required: true - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/AuthenticateRequest' - examples: - authenticateRequest: - value: - tenant_id: zzte_053 - client_id: 12345678-1234-1234-1234-123456789012 - channel_id: RefArch - user_id: user@example.com + minLength: 1 + maxLength: 4096 + example: Bearer eyJ2ZXIiOiIxLjAiLCJraWQiOiI0ZTQyNTFkOS0zM2Y2LTRjMTMtYjZmZC1mOWJkNTJmYTZhNDciLCJ0eXAiOiJqd3QiLCJjbHYiOiJKMi4xLjAiLCJhbGciOiJFUzI1NiJ5... responses: - '200': - description: Authentication options successfully generated - content: - application/json: + '204': + description: The passkey credential was deleted successfully. + headers: + X-RateLimit-1M-Limit: + description: The 1 minute maximum number of requests permitted per hour. schema: - $ref: '#/components/schemas/PublicKeyCredentialRequestOptions' - examples: - webauthnAuthenticationStartSuccess: - $ref: '#/components/examples/webauthnAuthenticationStartSuccess' + type: string + X-RateLimit-1M-Remaining: + description: The 1 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-1M-Reset: + description: The 1 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + X-RateLimit-5M-Limit: + description: The 5 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-5M-Remaining: + description: The 5 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-5M-Reset: + description: The 5 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string '400': description: Bad request content: @@ -2422,8 +2974,35 @@ paths: schema: $ref: '#/components/schemas/Oauth2ErrorResponse' examples: - BadOrMissingClientId400: - $ref: '#/components/examples/BadOrMissingClientId400' + BadOrMissingParameter400: + value: + error: invalid_request + error_description: The login ID or credential ID is missing or invalid. + headers: + X-RateLimit-1M-Limit: + description: The 1 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-1M-Remaining: + description: The 1 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-1M-Reset: + description: The 1 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + X-RateLimit-5M-Limit: + description: The 5 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-5M-Remaining: + description: The 5 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-5M-Reset: + description: The 5 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string '401': description: Unauthorized content: @@ -2433,66 +3012,127 @@ paths: examples: Unauthorized401: $ref: '#/components/examples/InvalidClient401' - '404': - description: Not Found - content: - application/problem+json: + headers: + X-RateLimit-1M-Limit: + description: The 1 minute maximum number of requests permitted per hour. schema: - $ref: '#/components/schemas/Oauth2ErrorResponse' - examples: - UserNotFound404: - $ref: '#/components/examples/UserNotFound404' - /organizations/{organizationId}/oauth2/webauthn/authenticate/finish: - post: - summary: Finish WebAuthn authentication - description: | - Completes the WebAuthn authentication process by verifying the assertion from the authenticator. - Returns OAuth tokens upon successful authentication. - operationId: finishWebauthnAuthentication - parameters: - - $ref: '#/components/parameters/organizationId' - - name: Authorization - in: header - description: 'Base64-encoded string for HTTP Basic authentication. The string is composed of a client ID and client secret, separated by a colon (`:`). For example: `clientId:clientSecret`.' - required: false - schema: - type: string - example: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/AuthenticateFinishRequest' - responses: - '200': - description: Authentication successful - content: - application/json: + type: string + X-RateLimit-1M-Remaining: + description: The 1 minute number of requests remaining in the current rate limit window. schema: - $ref: '#/components/schemas/AuthenticateResult' - examples: - webauthnAuthenticationFinishSuccess: - $ref: '#/components/examples/webauthnAuthenticationFinishSuccess' - '400': - description: Bad request + type: string + X-RateLimit-1M-Reset: + description: The 1 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + X-RateLimit-5M-Limit: + description: The 5 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-5M-Remaining: + description: The 5 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-5M-Reset: + description: The 5 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + '403': + description: Forbidden - token validation failed content: application/problem+json: schema: $ref: '#/components/schemas/Oauth2ErrorResponse' examples: - BadOrMissingClientId400: - $ref: '#/components/examples/BadOrMissingClientId400' - '401': - description: Unauthorized + TokenMismatch403: + value: + error: forbidden + error_description: The loginId, organizationId, or channel_id in the token does not match the request parameters. + headers: + X-RateLimit-1M-Limit: + description: The 1 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-1M-Remaining: + description: The 1 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-1M-Reset: + description: The 1 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + X-RateLimit-5M-Limit: + description: The 5 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-5M-Remaining: + description: The 5 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-5M-Reset: + description: The 5 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + '404': + description: Not found content: application/problem+json: schema: $ref: '#/components/schemas/Oauth2ErrorResponse' examples: - Unauthorized401: - $ref: '#/components/examples/InvalidClient401' + PasskeyCredentialNotFound404: + value: + error: not_found + error_description: No passkey credential found with the provided credential ID. + headers: + X-RateLimit-1M-Limit: + description: The 1 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-1M-Remaining: + description: The 1 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-1M-Reset: + description: The 1 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + X-RateLimit-5M-Limit: + description: The 5 minute maximum number of requests permitted per hour. + schema: + type: string + X-RateLimit-5M-Remaining: + description: The 5 minute number of requests remaining in the current rate limit window. + schema: + type: string + X-RateLimit-5M-Reset: + description: The 5 minute time at which the current rate limit window resets in UTC epoch seconds. + schema: + type: string + security: + - ShopperToken: + - sfcc.pwdless_login components: + securitySchemes: + ShopperToken: + type: oauth2 + description: "ShopperToken authentication follows the authorization code grant flow, as defined by the OAuth 2.1 standard. Depending on the type of OAuth client (public or private), this authorization flow has further requirements. \nFor a detailed description of the authorization flow, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nA shopper token allows you to access the Shopper API endpoints of both OCAPI and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications.\nThe `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token.\n" + flows: + clientCredentials: + tokenUrl: https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.pwdless_login: Passwordless Login scope + sfcc.session_bridge: Session Bridge scope + sfcc.ta_ext_on_behalf_of: Trusted Agent External On Behalf Of scope + sfcc.ts_ext_on_behalf_of: Trusted System External On Behalf Of scope + authorizationCode: + authorizationUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/authorize + tokenUrl: https://{short-code}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token + scopes: + sfcc.pwdless_login: Passwordless Login scope + sfcc.session_bridge: Session Bridge scope + sfcc.ta_ext_on_behalf_of: Trusted Agent External On Behalf Of scope + sfcc.ts_ext_on_behalf_of: Trusted System External On Behalf Of scope schemas: OrganizationId: description: An identifier for the organization the request is being made by @@ -3520,6 +4160,80 @@ components: example: true tokenResponse: $ref: '#/components/schemas/TokenResponse' + PasskeyCredential: + type: object + description: Represents a WebAuthn passkey credential + properties: + id: + type: integer + format: int32 + description: Unique identifier for the credential + example: 20 + userId: + type: integer + format: int32 + description: The ID of the user who owns this credential + example: 26 + credentialId: + type: string + description: The WebAuthn credential ID + maxLength: 1024 + example: SVKfbUGBXofb2JzliJrMtZDENYByWgq_j4-p2M_3wC4 + nickName: + type: string + description: User-friendly name for the credential + maxLength: 32 + example: Fingerprint + publicKey: + type: string + description: The public key associated with this credential + maxLength: 1024 + example: pQECAyYgASFYIHM_4IKLMC8dboiRNfD0E0Gk4LmCTIgEyCTr-9SyHHeIIlggfn5_AzAl67kttLXWb-_Ts6MG7WHKoXzlKtame_wEYPE + userHandle: + type: string + description: The user handle associated with this credential + maxLength: 128 + example: yRU-7pWyWUE6nw8hztqqUZG635p7UKDDb2lbC1FyF78 + signatureCount: + type: string + maxLength: 8 + description: The signature counter for replay attack prevention + example: '42' + PasskeyUser: + type: object + description: Represents a passkey user with their associated credentials + properties: + id: + type: integer + format: int32 + description: Unique identifier for the passkey user + example: 26 + userName: + type: string + description: The username of the passkey user + maxLength: 128 + example: user@example.com + displayName: + type: string + description: The display name of the passkey user + maxLength: 256 + example: John Doe + userHandle: + type: string + description: The user handle (WebAuthn user ID) + maxLength: 128 + example: yRU-7pWyWUE6nw8hztqqUZG635p7UKDDb2lbC1FyF78 + slasUserId: + type: integer + format: int32 + description: The associated SLAS user ID + example: 10000 + credentials: + type: array + description: Set of passkey credentials associated with this user + uniqueItems: true + items: + $ref: '#/components/schemas/PasskeyCredential' parameters: organizationId: description: An identifier for the organization the request is being made by @@ -3982,3 +4696,26 @@ components: customer_id: '1000005' enc_user_id: 45D39A8499A95288F82855427EBA99B5 idp_access_token: '' + getPasskeyUserByLoginIdSuccess: + value: + id: 26 + userName: user@example.com + displayName: John Doe + userHandle: yRU-7pWyWUE6nw8hztqqUZG635p7UKDDb2lbC1FyF78 + slasUserId: 10000 + credentials: + - id: 21 + userId: 26 + credentialId: t5Awv5pJ_kM7K8U2-5ijw5rSKNkHFHTTg_gAbdrod8c + nickName: Fingerprint + publicKey: pQECAyYgASFYIKIpY59lUthC1dDw_9WXKCOaLNCB2WSoGrK0kAZG33s3IlggxTvdmk2QC_HPjAwf_eHdoxIBvfN3c376ws8xUaxlJ4A + userHandle: yRU-7pWyWUE6nw8hztqqUZG635p7UKDDb2lbC1FyF78 + signatureCount: '2' + - id: 22 + userId: 26 + credentialId: SVKfbUGBXofb2JzliJrMtZDENYByWgq_j4-p2M_3wC4 + nickName: YubiKey + publicKey: pQECAyYgASFYIHM_4IKLMC8dboiRNfD0E0Gk4LmCTIgEyCTr-9SyHHeIIlggfn5_AzAl67kttLXWb-_Ts6MG7WHKoXzlKtame_wEYPE + userHandle: yRU-7pWyWUE6nw8hztqqUZG635p7UKDDb2lbC1FyF78 + signatureCount: '5' +x-sdk-classname: ShopperLogin diff --git a/apis/shopper-login-oas-1.43.0/exchange.json b/apis/auth-oas-1.46.0/exchange.json similarity index 60% rename from apis/shopper-login-oas-1.43.0/exchange.json rename to apis/auth-oas-1.46.0/exchange.json index 75679c5e..18e71d86 100644 --- a/apis/shopper-login-oas-1.43.0/exchange.json +++ b/apis/auth-oas-1.46.0/exchange.json @@ -1,9 +1,9 @@ { - "main": "shopper-login-oas-v1-public.yaml", - "name": "Shopper Login OAS", + "main": "auth-oas-v1-public.yaml", + "name": "Auth OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", - "assetId": "shopper-login-oas", - "version": "1.43.0", + "assetId": "auth-oas", + "version": "1.46.0", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-baskets-oas-1.9.4/exchange.json b/apis/shopper-baskets-oas-1.11.0/exchange.json similarity index 93% rename from apis/shopper-baskets-oas-1.9.4/exchange.json rename to apis/shopper-baskets-oas-1.11.0/exchange.json index 10a82bd5..8d6741e2 100644 --- a/apis/shopper-baskets-oas-1.9.4/exchange.json +++ b/apis/shopper-baskets-oas-1.11.0/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Baskets OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-baskets-oas", - "version": "1.9.4", + "version": "1.11.0", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-baskets-oas-1.9.4/shopper-baskets-oas-v1-public.yaml b/apis/shopper-baskets-oas-1.11.0/shopper-baskets-oas-v1-public.yaml similarity index 99% rename from apis/shopper-baskets-oas-1.9.4/shopper-baskets-oas-v1-public.yaml rename to apis/shopper-baskets-oas-1.11.0/shopper-baskets-oas-v1-public.yaml index c9659e1b..629d6b31 100644 --- a/apis/shopper-baskets-oas-1.9.4/shopper-baskets-oas-v1-public.yaml +++ b/apis/shopper-baskets-oas-1.11.0/shopper-baskets-oas-v1-public.yaml @@ -3,7 +3,7 @@ info: x-api-type: Shopper x-api-family: Checkout title: Shopper Baskets - version: 1.9.4 + version: 1.11.0 description: |- [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-baskets/shopper-baskets-oas-v1-public.yaml) @@ -126,6 +126,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard responses: '200': description: The initialized basket. @@ -206,6 +207,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/overrideExisting' - $ref: '#/components/parameters/merge' @@ -297,6 +299,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/createDestinationBasket' - $ref: '#/components/parameters/productItemMergeMode' @@ -346,6 +349,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard responses: '204': description: Success, without a body. @@ -377,6 +381,7 @@ paths: - ShopperToken: - sfcc.shopper-baskets-orders.rw - sfcc.shopper-baskets-orders + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/locale' responses: @@ -418,6 +423,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/removeExternalTax' - $ref: '#/components/parameters/locale' @@ -486,6 +492,7 @@ paths: security: - ShopperTokenTaob: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/locale' responses: @@ -528,6 +535,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/locale' - $ref: '#/components/parameters/useAsShipping' @@ -583,6 +591,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/locale' requestBody: @@ -642,6 +651,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/locale' responses: @@ -690,6 +700,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/locale' requestBody: @@ -751,6 +762,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/locale' responses: @@ -807,6 +819,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard responses: '200': description: Success, the response body contains the basket without the deleted gift certificate. @@ -826,6 +839,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/locale' responses: @@ -950,6 +964,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard requestBody: content: application/json: @@ -1001,6 +1016,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard requestBody: content: application/json: @@ -1057,6 +1073,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/siteId' - $ref: '#/components/parameters/locale' @@ -1118,6 +1135,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard requestBody: content: application/json: @@ -1222,6 +1240,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard requestBody: content: application/json: @@ -1279,6 +1298,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/siteId' - $ref: '#/components/parameters/locale' @@ -1325,6 +1345,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard requestBody: content: application/json: @@ -1381,6 +1402,7 @@ paths: - ShopperToken: - sfcc.shopper-baskets-orders.rw - sfcc.shopper-baskets-orders + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/siteId' - $ref: '#/components/parameters/locale' @@ -1430,6 +1452,7 @@ paths: security: - ShopperTokenTaob: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard requestBody: content: application/json: @@ -1481,6 +1504,7 @@ paths: security: - ShopperTokenTaob: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/siteId' - $ref: '#/components/parameters/locale' @@ -1524,6 +1548,7 @@ paths: security: - ShopperTokenTaob: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard requestBody: content: application/json: @@ -1662,6 +1687,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard requestBody: content: application/json: @@ -1733,6 +1759,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/siteId' - $ref: '#/components/parameters/locale' @@ -1792,6 +1819,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard requestBody: content: application/json: @@ -1848,6 +1876,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard requestBody: content: application/json: @@ -1908,6 +1937,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard requestBody: content: application/json: @@ -1966,6 +1996,7 @@ paths: - ShopperToken: - sfcc.shopper-baskets-orders.rw - sfcc.shopper-baskets-orders + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/siteId' - $ref: '#/components/parameters/locale' @@ -2009,6 +2040,7 @@ paths: security: - ShopperTokenTaob: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/exchange' - $ref: '#/components/parameters/locale' diff --git a/apis/shopper-baskets-oas-2.3.3/exchange.json b/apis/shopper-baskets-oas-2.5.1/exchange.json similarity index 93% rename from apis/shopper-baskets-oas-2.3.3/exchange.json rename to apis/shopper-baskets-oas-2.5.1/exchange.json index 36fe3e2e..314a1405 100644 --- a/apis/shopper-baskets-oas-2.3.3/exchange.json +++ b/apis/shopper-baskets-oas-2.5.1/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Baskets OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-baskets-oas", - "version": "2.3.3", + "version": "2.5.1", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-baskets-oas-2.3.3/shopper-baskets-oas-v2-public.yaml b/apis/shopper-baskets-oas-2.5.1/shopper-baskets-oas-v2-public.yaml similarity index 98% rename from apis/shopper-baskets-oas-2.3.3/shopper-baskets-oas-v2-public.yaml rename to apis/shopper-baskets-oas-2.5.1/shopper-baskets-oas-v2-public.yaml index 8b0db0a2..f143ea40 100644 --- a/apis/shopper-baskets-oas-2.3.3/shopper-baskets-oas-v2-public.yaml +++ b/apis/shopper-baskets-oas-2.5.1/shopper-baskets-oas-v2-public.yaml @@ -3,7 +3,7 @@ info: x-api-type: Shopper x-api-family: Checkout title: Shopper Baskets - version: 2.3.3 + version: 2.5.1 description: |- [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-baskets-v2/shopper-baskets-oas-v2-public.yaml) @@ -197,6 +197,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard /organizations/{organizationId}/baskets/actions/transfer: post: description: |- @@ -257,6 +258,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/siteId' - $ref: '#/components/parameters/organizationId' @@ -346,6 +348,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/siteId' - $ref: '#/components/parameters/organizationId' @@ -390,6 +393,7 @@ paths: - ShopperToken: - sfcc.shopper-baskets-orders - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard delete: description: Removes a basket. operationId: deleteBasket @@ -420,6 +424,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard patch: description: |- Updates a basket. Only the currency of the basket, source code, the custom @@ -485,6 +490,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/siteId' - $ref: '#/components/parameters/organizationId' @@ -582,6 +588,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/siteId' - $ref: '#/components/parameters/organizationId' @@ -640,6 +647,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/siteId' - $ref: '#/components/parameters/organizationId' @@ -688,6 +696,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/siteId' - $ref: '#/components/parameters/organizationId' @@ -750,6 +759,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/siteId' - $ref: '#/components/parameters/organizationId' @@ -803,6 +813,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/siteId' - $ref: '#/components/parameters/organizationId' @@ -829,6 +840,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard patch: description: Updates a gift certificate item of an existing basket. operationId: updateGiftCertificateItemInBasket @@ -877,6 +889,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/siteId' - $ref: '#/components/parameters/organizationId' @@ -921,7 +934,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/ProductItem' + $ref: '#/components/schemas/BasketProductItem' examples: ItemPost: $ref: '#/components/examples/ItemPost' @@ -978,6 +991,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard patch: description: |- Updates multiple items in a basket. This behaviour matches that of updating a @@ -1024,7 +1038,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/ProductItem' + $ref: '#/components/schemas/BasketProductItem' examples: ItemPatch: $ref: '#/components/examples/ItemPatch' @@ -1063,6 +1077,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/organizationId' - $ref: '#/components/parameters/basketId' @@ -1108,6 +1123,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard patch: description: |- Updates an item in a basket. The item to be updated can be a bundled product item, although the @@ -1150,7 +1166,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ProductItem' + $ref: '#/components/schemas/BasketProductItem' examples: ItemPatch: $ref: '#/components/examples/ItemPatch' @@ -1199,6 +1215,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/itemId' - $ref: '#/components/parameters/organizationId' @@ -1306,6 +1323,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/organizationId' - $ref: '#/components/parameters/basketId' @@ -1354,6 +1372,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard patch: description: Updates payment instrument of an existing basket. operationId: updatePaymentInstrumentInBasket @@ -1410,6 +1429,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/paymentInstrumentId' - $ref: '#/components/parameters/organizationId' @@ -1456,6 +1476,7 @@ paths: - ShopperToken: - sfcc.shopper-baskets-orders - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/organizationId' - $ref: '#/components/parameters/basketId' @@ -1514,6 +1535,7 @@ paths: security: - ShopperTokenTaob: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/organizationId' - $ref: '#/components/parameters/basketId' @@ -1556,6 +1578,7 @@ paths: security: - ShopperTokenTaob: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard patch: description: |- Updates a custom manual price adjustment on the basket. Only the following path values are considered for the update; all other attributes are ignored. @@ -1613,6 +1636,7 @@ paths: security: - ShopperTokenTaob: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/priceAdjustmentId' - $ref: '#/components/parameters/organizationId' @@ -1752,6 +1776,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/organizationId' - $ref: '#/components/parameters/basketId' @@ -1814,6 +1839,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard patch: description: |- Updates a shipment for a basket. @@ -1882,6 +1908,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/shipmentId' - $ref: '#/components/parameters/organizationId' @@ -1940,6 +1967,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/organizationId' - $ref: '#/components/parameters/shipmentId' @@ -1998,6 +2026,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/organizationId' - $ref: '#/components/parameters/shipmentId' @@ -2047,6 +2076,7 @@ paths: - ShopperToken: - sfcc.shopper-baskets-orders - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/organizationId' - $ref: '#/components/parameters/shipmentId' @@ -2090,6 +2120,7 @@ paths: security: - ShopperTokenTaob: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/organizationId' - $ref: '#/components/parameters/basketId' @@ -2754,6 +2785,31 @@ components: description: The year the payment card is valid from. example: 2015 type: integer + GiftCardResponse: + additionalProperties: false + description: Document representing a gift card response. + type: object + properties: + brand: + maxLength: 256 + description: The gift card brand. + example: givex + type: string + maskedCardNumber: + maxLength: 40 + description: The masked gift card number. + example: '*********4422' + type: string + expirationMonth: + format: int32 + description: The month when the gift card expires. + example: 1 + type: integer + expirationYear: + format: int32 + description: The year when the gift card expires. + example: 2030 + type: integer PaymentInstrumentId: description: The payment instrument ID example: ba248424e3eee797f062162f8b @@ -2784,6 +2840,10 @@ components: description: The payment card. allOf: - $ref: '#/components/schemas/PaymentCard' + giftCard: + description: The gift card. + allOf: + - $ref: '#/components/schemas/GiftCardResponse' paymentInstrumentId: description: The payment instrument ID. It is read only. allOf: @@ -2802,12 +2862,6 @@ components: type: string maxLength: 256 example: pi_3N4B2vF0wDjebNCp1234567 - redirectUrl: - description: Redirect URL for payment methods that require user redirection to complete payment. - type: string - format: uri - maxLength: 2048 - example: https://checkout.stripe.com/pay/cs_test_abc123 gateway: description: The payment gateway used to process the payment. example: stripe @@ -2843,6 +2897,16 @@ components: adyen: description: | # Adyen specific properties. + + - adyenError: Error information returned by Adyen if the payment fails. Null on success. + - adyenPaymentIntent: The Adyen payment intent object containing payment details and required actions. + - resultCode: The result of the payment request (for example, "REDIRECT_SHOPPER", "AUTHORISED", "PENDING", "REFUSED"). + - accountID: The Adyen merchant account ID. + - adyenPaymentIntentAction: The action object for payment methods requiring additional shopper interaction. + - url: The URL for completing the payment (redirect or 3DS authentication). + - type: The action type (for example, "redirect", "threeDS2", "voucher"). + - method: The HTTP method for the action (for example, "GET", "POST"). + - successful: A boolean indicating whether the Adyen operation is successful. type: object additionalProperties: true ProductItem: @@ -2973,10 +3037,6 @@ components: a particular shipping method. It is read only. example: 006490dcc338feeafc71c964bf type: string - omsData: - description: Information retrieved from Order Management (OMS) for the product. Only available in context of an order. - allOf: - - $ref: '#/components/schemas/OmsProductData' tax: format: double description: The tax for the product item, not including price adjustments. It is read only. @@ -3229,31 +3289,10 @@ components: type: string required: - id - OmsProductData: - description: "Additional information retrieved from Order Management (OMS) \nSee https://developer.salesforce.com/docs/atlas.en-us.order_management_developer_guide.meta/order_management_developer_guide/sforce_api_objects_orderitemsummary.htm for more information.\nOnly available in context of an order." - additionalProperties: false - properties: - status: - description: Order Management (OMS) status - example: ordered - enum: - - ordered - - returned - - canceled - - paid - - reshipped - - fulfilled - - partially_fulfilled - - allocated - - partially_allocated - - return_initiated - type: string - quantityAvailableToCancel: - format: double - description: The quantity that can be cancelled. - example: 2 - type: number - type: object + BasketProductItem: + description: Document representing a basket product item. + allOf: + - $ref: '#/components/schemas/ProductItem' ShipmentId: minLength: 1 type: string @@ -3635,7 +3674,7 @@ components: description: The product items. type: array items: - $ref: '#/components/schemas/ProductItem' + $ref: '#/components/schemas/BasketProductItem' productSubTotal: format: double description: |- @@ -3819,6 +3858,40 @@ components: description: The year the payment card is valid from. example: 2019 type: integer + GiftCardRequest: + additionalProperties: false + description: Represents gift card details for a request. + type: object + required: + - brand + - cardNumber + - cvc + properties: + brand: + maxLength: 256 + description: The gift card type or brand (for example, givex, blackhawk). + example: givex + type: string + cardNumber: + maxLength: 40 + description: The gift card number. + example: '6364530000000000' + type: string + cvc: + maxLength: 4 + description: The card verification code (CVC/CVV) for the gift card. + example: '123' + type: string + expirationMonth: + format: int32 + description: The month when the gift card expires. + example: 1 + type: integer + expirationYear: + format: int32 + description: The year when the gift card expires. + example: 2030 + type: integer PaymentReferenceRequest: type: object description: Properties for Payments Reference Request @@ -3904,6 +3977,10 @@ components: description: The payment card. allOf: - $ref: '#/components/schemas/OrderPaymentCardRequest' + giftCardRequest: + description: The gift card request. + allOf: + - $ref: '#/components/schemas/GiftCardRequest' paymentMethodId: maxLength: 256 description: The payment method ID. diff --git a/apis/shopper-configurations-oas-1.0.2/exchange.json b/apis/shopper-configurations-oas-1.2.0/exchange.json similarity index 93% rename from apis/shopper-configurations-oas-1.0.2/exchange.json rename to apis/shopper-configurations-oas-1.2.0/exchange.json index 5fc9b276..a9f6bb0c 100644 --- a/apis/shopper-configurations-oas-1.0.2/exchange.json +++ b/apis/shopper-configurations-oas-1.2.0/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Configurations OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-configurations-oas", - "version": "1.0.2", + "version": "1.2.0", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-configurations-oas-1.0.2/shopper-configurations-oas-v1-public.yaml b/apis/shopper-configurations-oas-1.2.0/shopper-configurations-oas-v1-public.yaml similarity index 99% rename from apis/shopper-configurations-oas-1.0.2/shopper-configurations-oas-v1-public.yaml rename to apis/shopper-configurations-oas-1.2.0/shopper-configurations-oas-v1-public.yaml index 5c1b234b..85145e86 100644 --- a/apis/shopper-configurations-oas-1.0.2/shopper-configurations-oas-v1-public.yaml +++ b/apis/shopper-configurations-oas-1.2.0/shopper-configurations-oas-v1-public.yaml @@ -3,7 +3,7 @@ info: x-api-type: Shopper x-api-family: Configuration title: Shopper Configurations - version: 1.0.2 + version: 1.2.0 description: |- [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-configurations/shopper-configurations-oas-v1-public.yaml) @@ -119,6 +119,7 @@ paths: security: - ShopperToken: - sfcc.shopper-configurations + - sfcc.shopper-standard components: securitySchemes: ShopperToken: diff --git a/apis/shopper-customers-oas-1.3.2/exchange.json b/apis/shopper-customers-oas-1.6.1/exchange.json similarity index 93% rename from apis/shopper-customers-oas-1.3.2/exchange.json rename to apis/shopper-customers-oas-1.6.1/exchange.json index 66f6bf0a..a47aa3ff 100644 --- a/apis/shopper-customers-oas-1.3.2/exchange.json +++ b/apis/shopper-customers-oas-1.6.1/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Customers OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-customers-oas", - "version": "1.3.2", + "version": "1.6.1", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-customers-oas-1.3.2/shopper-customers-oas-v1-public.yaml b/apis/shopper-customers-oas-1.6.1/shopper-customers-oas-v1-public.yaml similarity index 97% rename from apis/shopper-customers-oas-1.3.2/shopper-customers-oas-v1-public.yaml rename to apis/shopper-customers-oas-1.6.1/shopper-customers-oas-v1-public.yaml index 21583b05..240d0232 100644 --- a/apis/shopper-customers-oas-1.3.2/shopper-customers-oas-v1-public.yaml +++ b/apis/shopper-customers-oas-1.6.1/shopper-customers-oas-v1-public.yaml @@ -3,7 +3,7 @@ info: x-api-type: Shopper x-api-family: Customer title: Shopper Customers - version: 1.3.2 + version: 1.6.1 description: |- [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-customers/shopper-customers-oas-v1-public.yaml) @@ -116,6 +116,7 @@ paths: security: - ShopperToken: - sfcc.shopper-customers.register + - sfcc.shopper-standard /organizations/{organizationId}/customers/password/actions/reset: post: summary: Reset customer password after obtaining a reset token. @@ -279,6 +280,7 @@ paths: security: - ShopperToken: - sfcc.shopper-customers.register + - sfcc.shopper-standard /organizations/{organizationId}/customers/{customerId}: get: summary: Get a customer and all existing addresses and payment instruments associated with the requested customer. This endpoint only accepts a registered customer ShopperToken (JWT). @@ -324,6 +326,7 @@ paths: - ShopperToken: - sfcc.shopper-myaccount - sfcc.shopper-myaccount.rw + - sfcc.shopper-standard patch: summary: Update a customer. This endpoint only accepts a registered customer ShopperToken (JWT). operationId: updateCustomer @@ -373,6 +376,7 @@ paths: security: - ShopperToken: - sfcc.shopper-myaccount.rw + - sfcc.shopper-standard /organizations/{organizationId}/customers/{customerId}/addresses: post: summary: Create a new address with the given name for the customer. This endpoint only accepts a registered customer ShopperToken (JWT). @@ -423,6 +427,7 @@ paths: security: - ShopperToken: - sfcc.shopper-myaccount.addresses.rw + - sfcc.shopper-standard /organizations/{organizationId}/customers/{customerId}/addresses/{addressName}: get: summary: Retrieve a customer's address by address name. This endpoint only accepts a registered customer ShopperToken (JWT). @@ -466,6 +471,7 @@ paths: - ShopperToken: - sfcc.shopper-myaccount.addresses - sfcc.shopper-myaccount.addresses.rw + - sfcc.shopper-standard delete: summary: Delete a customer's address by address name. This endpoint only accepts a registered customer ShopperToken (JWT). operationId: removeCustomerAddress @@ -500,6 +506,7 @@ paths: security: - ShopperToken: - sfcc.shopper-myaccount.addresses.rw + - sfcc.shopper-standard patch: summary: Update a customer's address by address name. This endpoint only accepts a registered customer ShopperToken (JWT). operationId: updateCustomerAddress @@ -550,6 +557,7 @@ paths: security: - ShopperToken: - sfcc.shopper-myaccount.addresses.rw + - sfcc.shopper-standard /organizations/{organizationId}/customers/{customerId}/baskets: get: summary: Get the baskets for a customer. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. @@ -591,6 +599,7 @@ paths: security: - ShopperToken: - sfcc.shopper-myaccount.baskets + - sfcc.shopper-standard /organizations/{organizationId}/customers/{customerId}/orders: get: summary: Return a page list of all the customer's orders. The default page size is 10. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. @@ -655,6 +664,7 @@ paths: security: - ShopperToken: - sfcc.shopper-myaccount.orders + - sfcc.shopper-standard /organizations/{organizationId}/customers/{customerId}/password: put: summary: Update a customer's password. This endpoint only accepts a registered customer ShopperToken (JWT). @@ -698,6 +708,7 @@ paths: security: - ShopperToken: - sfcc.shopper-customers.login + - sfcc.shopper-standard /organizations/{organizationId}/customers/{customerId}/payment-instruments: post: summary: Add a payment instrument to the customer information. This endpoint only accepts a registered customer ShopperToken (JWT). @@ -748,6 +759,7 @@ paths: security: - ShopperToken: - sfcc.shopper-myaccount.paymentinstruments.rw + - sfcc.shopper-standard /organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}: get: summary: Retrieve a customer's payment instrument by its ID. This endpoint only accepts a registered customer ShopperToken (JWT). @@ -791,6 +803,7 @@ paths: - ShopperToken: - sfcc.shopper-myaccount.paymentinstruments - sfcc.shopper-myaccount.paymentinstruments.rw + - sfcc.shopper-standard delete: summary: Delete a customer's payment instrument. This endpoint only accepts a registered customer ShopperToken (JWT). operationId: deleteCustomerPaymentInstrument @@ -825,6 +838,7 @@ paths: security: - ShopperToken: - sfcc.shopper-myaccount.paymentinstruments.rw + - sfcc.shopper-standard patch: summary: Update a customer's payment instrument. This endpoint only accepts a registered customer ShopperToken (JWT). operationId: updateCustomerPaymentInstrument @@ -874,6 +888,44 @@ paths: examples: getCustomer404: $ref: '#/components/examples/getCustomer404' + security: + - ShopperToken: + - sfcc.shopper-myaccount.paymentinstruments.rw + - sfcc.shopper-standard + /organizations/{organizationId}/customers/{customerId}/payment-method-references/{paymentMethodReferenceId}: + delete: + summary: Delete a customer's payment method reference. This endpoint only accepts a registered customer ShopperToken (JWT). + description: Deletes a specific payment method reference from a customer's account using the payment method reference ID and account ID. + operationId: deleteCustomerPaymentMethodReference + parameters: + - $ref: '#/components/parameters/paymentMethodReferenceId' + - $ref: '#/components/parameters/customerId' + - $ref: '#/components/parameters/organizationId' + - $ref: '#/components/parameters/siteId' + - $ref: '#/components/parameters/accountId' + responses: + '204': + description: No content + '400': + description: | + CustomerId URL parameter does not match the verified customer represented by the JWT token. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + registerCustomer400: + $ref: '#/components/examples/registerCustomer400' + '404': + description: | + Requested resource not found. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + getCustomer404: + $ref: '#/components/examples/getCustomer404' security: - ShopperToken: - sfcc.shopper-myaccount.paymentinstruments.rw @@ -919,6 +971,7 @@ paths: - ShopperToken: - sfcc.shopper-myaccount.productlists - sfcc.shopper-myaccount.productlists.rw + - sfcc.shopper-standard post: summary: Create a customer product list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. operationId: createCustomerProductList @@ -968,6 +1021,7 @@ paths: security: - ShopperToken: - sfcc.shopper-myaccount.productlists.rw + - sfcc.shopper-standard /organizations/{organizationId}/customers/{customerId}/product-lists/{listId}: get: summary: Return a customer product list for the given customer and the items in the list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. @@ -1011,6 +1065,7 @@ paths: - ShopperToken: - sfcc.shopper-myaccount.productlists - sfcc.shopper-myaccount.productlists.rw + - sfcc.shopper-standard delete: description: Delete a customer product list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. operationId: deleteCustomerProductList @@ -1045,6 +1100,7 @@ paths: security: - ShopperToken: - sfcc.shopper-myaccount.productlists.rw + - sfcc.shopper-standard patch: summary: Change a product list. Changeable properties include name, description, and if the list is public. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. operationId: updateCustomerProductList @@ -1095,6 +1151,7 @@ paths: security: - ShopperToken: - sfcc.shopper-myaccount.productlists.rw + - sfcc.shopper-standard /organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items: post: summary: Add an item to the customer's product list. @@ -1147,6 +1204,7 @@ paths: security: - ShopperToken: - sfcc.shopper-myaccount.productlists.rw + - sfcc.shopper-standard /organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}: get: summary: Return an item of a customer product list and the actual product details such as image, availability, and price. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. @@ -1191,6 +1249,7 @@ paths: - ShopperToken: - sfcc.shopper-myaccount.productlists - sfcc.shopper-myaccount.productlists.rw + - sfcc.shopper-standard delete: summary: Remove an item from a customer product list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. operationId: deleteCustomerProductListItem @@ -1216,6 +1275,7 @@ paths: security: - ShopperToken: - sfcc.shopper-myaccount.productlists.rw + - sfcc.shopper-standard patch: summary: Update an item in a customer's product list. description: |- @@ -1268,6 +1328,7 @@ paths: security: - ShopperToken: - sfcc.shopper-myaccount.productlists.rw + - sfcc.shopper-standard /organizations/{organizationId}/product-lists: get: summary: 'Retrieve all public product lists as defined by the given search term, for example: email OR first name and last name). This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken.' @@ -1321,6 +1382,7 @@ paths: security: - ShopperToken: - sfcc.shopper-productlists + - sfcc.shopper-standard /organizations/{organizationId}/product-lists/{listId}: get: summary: Retrieve a public product list by ID and the items under that product list. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. @@ -1369,6 +1431,7 @@ paths: security: - ShopperToken: - sfcc.shopper-productlists + - sfcc.shopper-standard /organizations/{organizationId}/product-lists/{listId}/items: get: summary: Retrieve all items of a public product list. @@ -1412,6 +1475,7 @@ paths: security: - ShopperToken: - sfcc.shopper-productlists + - sfcc.shopper-standard /organizations/{organizationId}/product-lists/{listId}/items/{itemId}: get: summary: Retrieve an item from a public product list and the actual product details such as product, image, availability, and price. This endpoint accepts a registered customer ShopperToken (JWT) or a guest customer ShopperToken. @@ -1464,6 +1528,7 @@ paths: security: - ShopperToken: - sfcc.shopper-productlists + - sfcc.shopper-standard components: securitySchemes: ShopperToken: @@ -2541,6 +2606,31 @@ components: type: integer type: object additionalProperties: false + GiftCardResponse: + additionalProperties: false + description: Document representing a gift card response. + type: object + properties: + brand: + maxLength: 256 + description: The gift card brand. + example: givex + type: string + maskedCardNumber: + maxLength: 40 + description: The masked gift card number. + example: '*********4422' + type: string + expirationMonth: + format: int32 + description: The month when the gift card expires. + example: 1 + type: integer + expirationYear: + format: int32 + description: The year when the gift card expires. + example: 2030 + type: integer PaymentInstrumentId: description: The payment instrument ID example: ba248424e3eee797f062162f8b @@ -2571,6 +2661,10 @@ components: description: The payment card. allOf: - $ref: '#/components/schemas/PaymentCard' + giftCard: + description: The gift card. + allOf: + - $ref: '#/components/schemas/GiftCardResponse' paymentInstrumentId: description: The payment instrument ID. It is read only. allOf: @@ -2589,12 +2683,6 @@ components: type: string maxLength: 256 example: pi_3N4B2vF0wDjebNCp1234567 - redirectUrl: - description: Redirect URL for payment methods that require user redirection to complete payment. - type: string - format: uri - maxLength: 2048 - example: https://checkout.stripe.com/pay/cs_test_abc123 gateway: description: The payment gateway used to process the payment. example: stripe @@ -2630,6 +2718,16 @@ components: adyen: description: | # Adyen specific properties. + + - adyenError: Error information returned by Adyen if the payment fails. Null on success. + - adyenPaymentIntent: The Adyen payment intent object containing payment details and required actions. + - resultCode: The result of the payment request (for example, "REDIRECT_SHOPPER", "AUTHORISED", "PENDING", "REFUSED"). + - accountID: The Adyen merchant account ID. + - adyenPaymentIntentAction: The action object for payment methods requiring additional shopper interaction. + - url: The URL for completing the payment (redirect or 3DS authentication). + - type: The action type (for example, "redirect", "threeDS2", "voucher"). + - method: The HTTP method for the action (for example, "GET", "POST"). + - successful: A boolean indicating whether the Adyen operation is successful. type: object additionalProperties: true ProductItem: @@ -2760,10 +2858,6 @@ components: a particular shipping method. It is read only. example: 006490dcc338feeafc71c964bf type: string - omsData: - description: Information retrieved from Order Management (OMS) for the product. Only available in context of an order. - allOf: - - $ref: '#/components/schemas/OmsProductData' tax: format: double description: The tax for the product item, not including price adjustments. It is read only. @@ -3016,31 +3110,10 @@ components: type: string required: - id - OmsProductData: - description: "Additional information retrieved from Order Management (OMS) \nSee https://developer.salesforce.com/docs/atlas.en-us.order_management_developer_guide.meta/order_management_developer_guide/sforce_api_objects_orderitemsummary.htm for more information.\nOnly available in context of an order." - additionalProperties: false - properties: - status: - description: Order Management (OMS) status - example: ordered - enum: - - ordered - - returned - - canceled - - paid - - reshipped - - fulfilled - - partially_fulfilled - - allocated - - partially_allocated - - return_initiated - type: string - quantityAvailableToCancel: - format: double - description: The quantity that can be cancelled. - example: 2 - type: number - type: object + BasketProductItem: + description: Document representing a basket product item. + allOf: + - $ref: '#/components/schemas/ProductItem' ShipmentId: minLength: 1 type: string @@ -3422,7 +3495,7 @@ components: description: The product items. type: array items: - $ref: '#/components/schemas/ProductItem' + $ref: '#/components/schemas/BasketProductItem' productSubTotal: format: double description: |- @@ -3567,6 +3640,40 @@ components: maxLength: 50 type: string example: '00000410' + OmsProductData: + description: "Additional information retrieved from Order Management (OMS) \nSee https://developer.salesforce.com/docs/atlas.en-us.order_management_developer_guide.meta/order_management_developer_guide/sforce_api_objects_orderitemsummary.htm for more information.\nOnly available in context of an order." + additionalProperties: false + properties: + status: + description: Order Management (OMS) status + example: ordered + enum: + - ordered + - returned + - canceled + - paid + - reshipped + - fulfilled + - partially_fulfilled + - allocated + - partially_allocated + - return_initiated + type: string + quantityAvailableToCancel: + format: double + description: The quantity that can be cancelled. + example: 2 + type: number + type: object + OrderProductItem: + description: Document representing an order product item. + allOf: + - $ref: '#/components/schemas/ProductItem' + properties: + omsData: + description: Product information retrieved from Order Management (OMS). Only available in the context of an order. + allOf: + - $ref: '#/components/schemas/OmsProductData' OmsShipmentItem: description: Individual item within a shipment type: object @@ -3799,7 +3906,7 @@ components: description: The product items. It is read only. type: array items: - $ref: '#/components/schemas/ProductItem' + $ref: '#/components/schemas/OrderProductItem' productSubTotal: format: double description: |- @@ -5314,6 +5421,26 @@ components: schema: minLength: 1 type: string + paymentMethodReferenceId: + name: paymentMethodReferenceId + in: path + description: The ID of the payment method reference to delete. + required: true + schema: + minLength: 1 + maxLength: 256 + type: string + example: pm_12345678 + accountId: + name: accountId + in: query + description: The account ID used to scope payment method references. + required: true + schema: + minLength: 1 + maxLength: 256 + type: string + example: acc_987654321 listId: name: listId in: path diff --git a/apis/shopper-experience-oas-1.1.2/exchange.json b/apis/shopper-experience-oas-1.2.1/exchange.json similarity index 93% rename from apis/shopper-experience-oas-1.1.2/exchange.json rename to apis/shopper-experience-oas-1.2.1/exchange.json index 411f0853..1df2d0a9 100644 --- a/apis/shopper-experience-oas-1.1.2/exchange.json +++ b/apis/shopper-experience-oas-1.2.1/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Experience OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-experience-oas", - "version": "1.1.2", + "version": "1.2.1", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-experience-oas-1.1.2/shopper-experience-oas-v1-public.yaml b/apis/shopper-experience-oas-1.2.1/shopper-experience-oas-v1-public.yaml similarity index 99% rename from apis/shopper-experience-oas-1.1.2/shopper-experience-oas-v1-public.yaml rename to apis/shopper-experience-oas-1.2.1/shopper-experience-oas-v1-public.yaml index e0ff687a..f35157df 100644 --- a/apis/shopper-experience-oas-1.1.2/shopper-experience-oas-v1-public.yaml +++ b/apis/shopper-experience-oas-1.2.1/shopper-experience-oas-v1-public.yaml @@ -3,7 +3,7 @@ info: x-api-type: Shopper x-api-family: Experience title: Shopper Experience - version: 1.1.2 + version: 1.2.1 description: |- [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-experience/shopper-experience-oas-v1-public.yaml) @@ -108,6 +108,7 @@ paths: - ShopperToken: - sfcc.shopper-experience - sfcc.shopper-experience.pages + - sfcc.shopper-standard /organizations/{organizationId}/pages/{pageId}: get: summary: Get a Page Designer page based on a single page ID. @@ -161,6 +162,7 @@ paths: - ShopperToken: - sfcc.shopper-experience - sfcc.shopper-experience.pages + - sfcc.shopper-standard /organizations/{organizationId}/contents/{id}: get: summary: Get a content asset by ID. diff --git a/apis/shopper-gift-certificates-oas-1.0.29/exchange.json b/apis/shopper-gift-certificates-oas-1.2.0/exchange.json similarity index 93% rename from apis/shopper-gift-certificates-oas-1.0.29/exchange.json rename to apis/shopper-gift-certificates-oas-1.2.0/exchange.json index cbc3050f..5c2916b3 100644 --- a/apis/shopper-gift-certificates-oas-1.0.29/exchange.json +++ b/apis/shopper-gift-certificates-oas-1.2.0/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Gift Certificates OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-gift-certificates-oas", - "version": "1.0.29", + "version": "1.2.0", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-gift-certificates-oas-1.0.29/shopper-gift-certificates-oas-v1-public.yaml b/apis/shopper-gift-certificates-oas-1.2.0/shopper-gift-certificates-oas-v1-public.yaml similarity index 99% rename from apis/shopper-gift-certificates-oas-1.0.29/shopper-gift-certificates-oas-v1-public.yaml rename to apis/shopper-gift-certificates-oas-1.2.0/shopper-gift-certificates-oas-v1-public.yaml index 54c83294..dbdb4229 100644 --- a/apis/shopper-gift-certificates-oas-1.0.29/shopper-gift-certificates-oas-v1-public.yaml +++ b/apis/shopper-gift-certificates-oas-1.2.0/shopper-gift-certificates-oas-v1-public.yaml @@ -3,7 +3,7 @@ info: x-api-type: Shopper x-api-family: Pricing title: Shopper Gift Certificates - version: 1.0.29 + version: 1.2.0 description: |- [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-gift-certificates/shopper-gift-certificates-oas-v1-public.yaml) @@ -74,6 +74,7 @@ paths: security: - ShopperToken: - sfcc.shopper-gift-certificates + - sfcc.shopper-standard components: securitySchemes: ShopperToken: diff --git a/apis/shopper-orders-oas-1.10.0/exchange.json b/apis/shopper-orders-oas-1.12.1/exchange.json similarity index 93% rename from apis/shopper-orders-oas-1.10.0/exchange.json rename to apis/shopper-orders-oas-1.12.1/exchange.json index 8c134584..29aea030 100644 --- a/apis/shopper-orders-oas-1.10.0/exchange.json +++ b/apis/shopper-orders-oas-1.12.1/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Orders OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-orders-oas", - "version": "1.10.0", + "version": "1.12.1", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-orders-oas-1.10.0/shopper-orders-oas-v1-public.yaml b/apis/shopper-orders-oas-1.12.1/shopper-orders-oas-v1-public.yaml similarity index 97% rename from apis/shopper-orders-oas-1.10.0/shopper-orders-oas-v1-public.yaml rename to apis/shopper-orders-oas-1.12.1/shopper-orders-oas-v1-public.yaml index cbed4e1a..05c68ba3 100644 --- a/apis/shopper-orders-oas-1.10.0/shopper-orders-oas-v1-public.yaml +++ b/apis/shopper-orders-oas-1.12.1/shopper-orders-oas-v1-public.yaml @@ -3,7 +3,7 @@ info: x-api-type: Shopper x-api-family: Checkout title: Shopper Orders - version: 1.10.0 + version: 1.12.1 description: |- [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-orders/shopper-orders-oas-v1-public.yaml) @@ -105,6 +105,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard /organizations/{organizationId}/orders/{orderNo}: get: description: Gets information for an order. @@ -139,6 +140,7 @@ paths: - ShopperToken: - sfcc.shopper-baskets-orders - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard /organizations/{organizationId}/orders/{orderNo}/lookup: post: description: |+ @@ -205,6 +207,7 @@ paths: - ShopperTokenTsob: - sfcc.shopper-baskets-orders - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard /organizations/{organizationId}/orders/{orderNo}/actions/fail: post: description: |- @@ -232,6 +235,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard responses: '201': description: | @@ -331,6 +335,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard /organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}: delete: description: Removes a payment instrument of an order. @@ -365,6 +370,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard patch: description: |- Updates a payment instrument of an order. @@ -433,6 +439,7 @@ paths: security: - ShopperToken: - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard /organizations/{organizationId}/orders/{orderNo}/payment-methods: get: description: Gets the applicable payment methods for an existing order considering the open payment amount only. @@ -477,6 +484,7 @@ paths: - ShopperToken: - sfcc.shopper-baskets-orders - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard /organizations/{organizationId}/orders/{orderNo}/taxes: get: description: |- @@ -1098,12 +1106,38 @@ components: description: The year the payment card is valid from. example: 2015 type: integer + GiftCardResponse: + additionalProperties: false + description: Document representing a gift card response. + type: object + properties: + brand: + maxLength: 256 + description: The gift card brand. + example: givex + type: string + maskedCardNumber: + maxLength: 40 + description: The masked gift card number. + example: '*********4422' + type: string + expirationMonth: + format: int32 + description: The month when the gift card expires. + example: 1 + type: integer + expirationYear: + format: int32 + description: The year when the gift card expires. + example: 2030 + type: integer PaymentInstrumentId: description: The payment instrument ID example: ba248424e3eee797f062162f8b type: string OrderPaymentInstrument: description: Document representing an order payment instrument. + type: object properties: amount: format: double @@ -1127,6 +1161,10 @@ components: description: The payment card. allOf: - $ref: '#/components/schemas/PaymentCard' + giftCard: + description: The gift card. + allOf: + - $ref: '#/components/schemas/GiftCardResponse' paymentInstrumentId: description: The payment instrument ID. It is read only. allOf: @@ -1145,12 +1183,6 @@ components: type: string maxLength: 256 example: pi_3N4B2vF0wDjebNCp1234567 - redirectUrl: - description: Redirect URL for payment methods that require user redirection to complete payment. - type: string - format: uri - maxLength: 2048 - example: https://checkout.stripe.com/pay/cs_test_abc123 gateway: description: The payment gateway used to process the payment. example: stripe @@ -1186,6 +1218,16 @@ components: adyen: description: | # Adyen specific properties. + + - adyenError: Error information returned by Adyen if the payment fails. Null on success. + - adyenPaymentIntent: The Adyen payment intent object containing payment details and required actions. + - resultCode: The result of the payment request (for example, "REDIRECT_SHOPPER", "AUTHORISED", "PENDING", "REFUSED"). + - accountID: The Adyen merchant account ID. + - adyenPaymentIntentAction: The action object for payment methods requiring additional shopper interaction. + - url: The URL for completing the payment (redirect or 3DS authentication). + - type: The action type (for example, "redirect", "threeDS2", "voucher"). + - method: The HTTP method for the action (for example, "GET", "POST"). + - successful: A boolean indicating whether the Adyen operation is successful. type: object additionalProperties: true ProductItem: @@ -1316,9 +1358,6 @@ components: a particular shipping method. It is read only. example: 006490dcc338feeafc71c964bf type: string - omsData: - description: Information retrieved from Order Management (OMS) for the product. - $ref: '#/components/schemas/OmsData' tax: format: double description: The tax for the product item, not including price adjustments. It is read only. @@ -1571,31 +1610,10 @@ components: type: string required: - id - OmsData: - description: "Additional information retrieved from Order Management (OMS) \nSee https://developer.salesforce.com/docs/atlas.en-us.order_management_developer_guide.meta/order_management_developer_guide/sforce_api_objects_orderitemsummary.htm for more information." - additionalProperties: false - properties: - status: - description: Order Management (OMS) status - example: ordered - enum: - - ordered - - returned - - canceled - - paid - - reshipped - - fulfilled - - partially_fulfilled - - allocated - - partially_allocated - - return_initiated - type: string - quantityAvailableToCancel: - format: double - description: The quantity that can be cancelled. - example: 2 - type: number - type: object + BasketProductItem: + description: Document representing a basket product item. + allOf: + - $ref: '#/components/schemas/ProductItem' ShipmentId: minLength: 1 type: string @@ -1977,7 +1995,7 @@ components: description: The product items. type: array items: - $ref: '#/components/schemas/ProductItem' + $ref: '#/components/schemas/BasketProductItem' productSubTotal: format: double description: |- @@ -2045,7 +2063,41 @@ components: maxLength: 50 type: string example: '00000410' - ShipmentItem: + OmsProductData: + description: "Additional information retrieved from Order Management (OMS) \nSee https://developer.salesforce.com/docs/atlas.en-us.order_management_developer_guide.meta/order_management_developer_guide/sforce_api_objects_orderitemsummary.htm for more information.\nOnly available in context of an order." + additionalProperties: false + properties: + status: + description: Order Management (OMS) status + example: ordered + enum: + - ordered + - returned + - canceled + - paid + - reshipped + - fulfilled + - partially_fulfilled + - allocated + - partially_allocated + - return_initiated + type: string + quantityAvailableToCancel: + format: double + description: The quantity that can be cancelled. + example: 2 + type: number + type: object + OrderProductItem: + description: Document representing an order product item. + allOf: + - $ref: '#/components/schemas/ProductItem' + properties: + omsData: + description: Product information retrieved from Order Management (OMS). Only available in the context of an order. + allOf: + - $ref: '#/components/schemas/OmsProductData' + OmsShipmentItem: description: Individual item within a shipment type: object additionalProperties: false @@ -2063,7 +2115,7 @@ components: type: number format: double example: 2 - schemas-Shipment: + OmsShipment: description: Shipment information from Salesforce Order Management created during fulfillment process. See https://developer.salesforce.com/docs/atlas.en-us.230.0.order_management_developer_guide.meta/order_management_developer_guide/sforce_api_objects_fulfillmentorder.htm for more information. type: object additionalProperties: false @@ -2102,8 +2154,8 @@ components: description: Items included in this shipment type: array items: - $ref: '#/components/schemas/ShipmentItem' - schemas-OmsData: + $ref: '#/components/schemas/OmsShipmentItem' + OmsData: description: "Additional information retrieved from Order Management (OMS) \nSee https://developer.salesforce.com/docs/atlas.en-us.order_management_developer_guide.meta/order_management_developer_guide/sforce_api_objects_ordersummary.htm for more information." additionalProperties: false properties: @@ -2115,7 +2167,7 @@ components: description: List of shipments associated with the order type: array items: - $ref: '#/components/schemas/schemas-Shipment' + $ref: '#/components/schemas/OmsShipment' type: object Order: description: Document representing an order. @@ -2277,7 +2329,7 @@ components: description: The product items. It is read only. type: array items: - $ref: '#/components/schemas/ProductItem' + $ref: '#/components/schemas/OrderProductItem' productSubTotal: format: double description: |- @@ -2335,7 +2387,8 @@ components: - $ref: '#/components/schemas/SiteId' omsData: description: Information retrieved from Order Management (OMS) for the order. - $ref: '#/components/schemas/schemas-OmsData' + allOf: + - $ref: '#/components/schemas/OmsData' sourceCode: description: The source code assigned to the basket from which this order was created. It is read only. example: OUTDOOR1 @@ -2494,6 +2547,40 @@ components: description: The year the payment card is valid from. example: 2019 type: integer + GiftCardRequest: + additionalProperties: false + description: Represents gift card details for a request. + type: object + required: + - brand + - cardNumber + - cvc + properties: + brand: + maxLength: 256 + description: The gift card type or brand (for example, givex, blackhawk). + example: givex + type: string + cardNumber: + maxLength: 40 + description: The gift card number. + example: '6364530000000000' + type: string + cvc: + maxLength: 4 + description: The card verification code (CVC/CVV) for the gift card. + example: '123' + type: string + expirationMonth: + format: int32 + description: The month when the gift card expires. + example: 1 + type: integer + expirationYear: + format: int32 + description: The year when the gift card expires. + example: 2030 + type: integer PaymentReferenceRequest: type: object description: Properties for Payments Reference Request @@ -2578,6 +2665,10 @@ components: description: The payment card. allOf: - $ref: '#/components/schemas/OrderPaymentCardRequest' + giftCardRequest: + description: The gift card request. + allOf: + - $ref: '#/components/schemas/GiftCardRequest' paymentMethodId: maxLength: 256 description: The payment method ID. @@ -3548,7 +3639,6 @@ components: paymentMethodId: PAYPAL paymentReference: paymentReferenceId: PAY-1AB23456CD789012EF34GHIJ - redirectUrl: https://www.paypal.com/checkoutnow?token=EC-1AB23456CD789012EF - amount: 566.76 paymentCard: cardType: Visa @@ -3557,7 +3647,6 @@ components: paymentMethodId: CREDIT_CARD paymentReference: paymentReferenceId: 8815749596351791C - redirectUrl: https://test.adyen.com/hpp/pay.shtml?merchantReference=12345 - amount: 2 paymentCard: expirationYear: 1990 diff --git a/apis/shopper-payments-oas-1.2.3/exchange.json b/apis/shopper-payments-oas-1.4.0/exchange.json similarity index 93% rename from apis/shopper-payments-oas-1.2.3/exchange.json rename to apis/shopper-payments-oas-1.4.0/exchange.json index c582e9a2..45182a6e 100644 --- a/apis/shopper-payments-oas-1.2.3/exchange.json +++ b/apis/shopper-payments-oas-1.4.0/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Payments OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-payments-oas", - "version": "1.2.3", + "version": "1.4.0", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-payments-oas-1.2.3/shopper-payments-oas-v1-public.yaml b/apis/shopper-payments-oas-1.4.0/shopper-payments-oas-v1-public.yaml similarity index 68% rename from apis/shopper-payments-oas-1.2.3/shopper-payments-oas-v1-public.yaml rename to apis/shopper-payments-oas-1.4.0/shopper-payments-oas-v1-public.yaml index c2d51155..7c1bfabc 100644 --- a/apis/shopper-payments-oas-1.2.3/shopper-payments-oas-v1-public.yaml +++ b/apis/shopper-payments-oas-1.4.0/shopper-payments-oas-v1-public.yaml @@ -3,8 +3,37 @@ info: x-api-type: Shopper x-api-family: Checkout title: Shopper Payments - version: 1.2.3 - description: "[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-payments/shopper-payments-oas-v1-public.yaml)\n\n# API Overview\n\nUse the Shopper Payments API to retrieve payment configuration information for organizations in the B2C Commerce system.\n\nThe Shopper Payments API provides access to comprehensive payment configuration data, including payment processor settings, gateway configurations, and payment method details.\n\n## Authentication & Authorization\n\nThe client requesting payment configuration information must have access to the `/payment-configuration` resource. The Shopper Payments API requires a shopper access token from the Shopper Login and API Access Service (SLAS).\n\nFor details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html#guest-user) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html#guest-user) in the SLAS guides.\n\nYou must include `sfcc.shopper-baskets-orders` or `sfcc.shopper-baskets-orders.rw` in the client ID used to generate the token. For a full list of permissions, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html)\n\n## Use Cases\n\n### Payment Method Discovery\n\nRetrieve available payment methods and their capabilities for dynamic payment form generation.\n\n- Payment Method Set Information: Access details about configured payment method set accounts. \n- Payment Methods: Supported payment method types (card, paypal, applepay, etc.), available payment modes for each method, and account associations. \n- Active Gateways: Return detailed payment method information including supported card brands.\n\n### Gateway Status Monitoring\n\nCheck the status and configuration of payment gateways and processors.\n\n- Gateway Response Data: Retrieve payment processor gateway information and supported payment methods. \n- Payment Method Set Accounts: Account identifiers and configurations, payment processor API keys and settings, gateway identifiers and response data, live/test mode indicators, and vendor information (Stripe, Adyen, PayPal, etc.). \n- Inactive/Pending Gateways: Might return null gateway response data. \n- Multiple Vendors: Support for different payment processors with vendor-specific configurations.\n\n### Payment Flow Configuration\n\nDetermine supported payment modes (multi-step vs express) for different payment methods.\n\n- Payment Modes Configuration: View supported payment modes (Multistep, Express) for each payment method. \n- Configuration Settings: Multi-step checkout enablement status, express checkout enablement status, automatic card capture settings, zone identification, saved payment method configuration, and merchant account identification.\n\n### SDK Version Management\n\nEnsure compatibility by checking the current SDK version requirements.\n\n- SDK Version Information: Get the current SDK version being used." + version: 1.4.0 + description: |- + [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-payments/shopper-payments-oas-v1-public.yaml) + + # API Overview + + Use the Shopper Payments API to: + + - Retrieve payment configuration information for storefronts when Salesforce Payments is enabled. + + The API returns the available payment methods, merchant account details, and payment gateway configurations for a specific payment zone site assignment. + + The response includes: + + - Zone ID: The unique identifier for the Payments zone. + - Payment Method Set Accounts: List of configured payment processor accounts with API keys, vendor information (Stripe, Adyen, PayPal, etc.), and live/test mode indicators. + - Payment Methods: List of available payment methods with their associated accounts, payment method types, and supported payment modes. + + ## Authentication & Authorization + + The client requesting payment configuration must have access to the `/payment-configuration` resource. The Shopper Payments API requires a shopper access token from the Shopper Login and API Access Service (SLAS). + + For details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html#guest-user) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html#guest-user) in the SLAS guides. + + You must include `sfcc.shopper-baskets-orders`, `sfcc.shopper-baskets-orders.rw`, or `sfcc.shopper-standard` in the client ID used to generate the SLAS token. For a full list of permissions, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html) + + ## Use Cases + + ### Retrieve Payment Configuration + + Retrieve payment configuration settings for Stripe, PayPal, and Adyen based on the payment methods enabled in the merchant's payment zone site. This includes API keys, vendor details, and live/test mode status. Specify a zone via `zoneId` or use `currency` and `countryCode` for automatic resolution. servers: - url: https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-payments/v1 variables: @@ -42,6 +71,7 @@ paths: - ShopperToken: - sfcc.shopper-baskets-orders - sfcc.shopper-baskets-orders.rw + - sfcc.shopper-standard responses: '200': description: Payment configuration details. @@ -58,6 +88,26 @@ paths: $ref: '#/components/examples/PaymentConfigurationGetForAdyen' noDataFound: $ref: '#/components/examples/PaymentConfigurationNoDataFound' + '400': + description: |- + Possible reasons: + - the site ID is required and must not be null. + - the specified currency is invalid (must be ISO 4217) or not + supported by the site. + - the provided country code is invalid (must be 2 uppercase + letters matching ISO 3166-1 alpha-2). + - the provided zone ID is invalid (must match pattern + [a-zA-Z0-9\-_]{1,100}). + - the provided amount is invalid (must be non-negative). + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ErrorResponse' + examples: + BadRequest: + $ref: '#/components/examples/BadRequest' + InvalidPaymentConfigurationRequest: + $ref: '#/components/examples/InvalidPaymentConfigurationRequest' tags: - Payment Configuration components: @@ -151,6 +201,11 @@ components: description: Account BN code (optional, null if not a PayPal account) example: Example_PPCP maxLength: 100 + country: + type: string + description: The country associated with this payment account configuration + example: US + maxLength: 256 paymentMethods: type: object nullable: true @@ -199,6 +254,46 @@ components: required: - paymentMethodSetAccounts - paymentMethods + ErrorResponse: + type: object + additionalProperties: true + properties: + title: + description: "A short, human-readable summary of the problem\ntype. It will not change from occurrence to occurrence of the \nproblem, except for purposes of localization\n" + type: string + maxLength: 256 + example: You do not have enough credit + type: + description: | + A URI reference [RFC3986] that identifies the + problem type. This specification encourages that, when + dereferenced, it provide human-readable documentation for the + problem type (e.g., using HTML [W3C.REC-html5-20141028]). When + this member is not present, its value is assumed to be + "about:blank". It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: NotEnoughMoney + detail: + description: A human-readable explanation specific to this occurrence of the problem. + type: string + example: Your current balance is 30, but that costs 50 + instance: + description: | + A URI reference that identifies the specific + occurrence of the problem. It may or may not yield further + information if dereferenced. It accepts relative URIs; this means + that they must be resolved relative to the document's base URI, as + per [RFC3986], Section 5. + type: string + maxLength: 2048 + example: /account/12345/msgs/abc + required: + - title + - type + - detail parameters: organizationId: description: An identifier for the organization the request is being made by @@ -297,6 +392,7 @@ components: paymentMethodSetAccounts: - accountId: TestAccount941ECOM config: + country: US key: test_JE2ML2CMKZHJRL3QWUW4YCE32A3SL3BH paymentMethods: paymentMethods: @@ -321,3 +417,14 @@ components: zoneId: null paymentMethodSetAccounts: [] paymentMethods: [] + BadRequest: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request + title: Bad Request + detail: Decoding of the property with path '$.failedExample.[1].intProperty' failed because the expected type is 'Integer|Decimal' but the actual type was 'String'. + InvalidPaymentConfigurationRequest: + value: + type: https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-payment-configuration-request + title: Bad Request + detail: The payment configuration request field 'countryCode' is invalid. + invalidField: countryCode diff --git a/apis/shopper-products-oas-1.1.3/exchange.json b/apis/shopper-products-oas-1.3.0/exchange.json similarity index 93% rename from apis/shopper-products-oas-1.1.3/exchange.json rename to apis/shopper-products-oas-1.3.0/exchange.json index a4fa9da2..aeb990d1 100644 --- a/apis/shopper-products-oas-1.1.3/exchange.json +++ b/apis/shopper-products-oas-1.3.0/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Products OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-products-oas", - "version": "1.1.3", + "version": "1.3.0", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-products-oas-1.1.3/shopper-products-oas-v1-public.yaml b/apis/shopper-products-oas-1.3.0/shopper-products-oas-v1-public.yaml similarity index 99% rename from apis/shopper-products-oas-1.1.3/shopper-products-oas-v1-public.yaml rename to apis/shopper-products-oas-1.3.0/shopper-products-oas-v1-public.yaml index b83aa4d5..5160806e 100644 --- a/apis/shopper-products-oas-1.1.3/shopper-products-oas-v1-public.yaml +++ b/apis/shopper-products-oas-1.3.0/shopper-products-oas-v1-public.yaml @@ -3,7 +3,7 @@ info: x-api-type: Shopper x-api-family: Product title: Shopper Products - version: 1.1.3 + version: 1.3.0 description: |- [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-products/shopper-products-oas-v1-public.yaml) @@ -95,6 +95,7 @@ paths: security: - ShopperToken: - sfcc.shopper-products + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/ids' - $ref: '#/components/parameters/inventoryIds' @@ -136,6 +137,7 @@ paths: security: - ShopperToken: - sfcc.shopper-products + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/inventoryIds' - $ref: '#/components/parameters/expand_singleId' @@ -185,6 +187,7 @@ paths: security: - ShopperToken: - sfcc.shopper-categories + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/parameters-ids' - $ref: '#/components/parameters/levels' @@ -222,6 +225,7 @@ paths: security: - ShopperToken: - sfcc.shopper-categories + - sfcc.shopper-standard parameters: - $ref: '#/components/parameters/levels' - $ref: '#/components/parameters/locale' diff --git a/apis/shopper-promotions-oas-1.0.39/exchange.json b/apis/shopper-promotions-oas-1.2.0/exchange.json similarity index 93% rename from apis/shopper-promotions-oas-1.0.39/exchange.json rename to apis/shopper-promotions-oas-1.2.0/exchange.json index d256e75a..4039ed24 100644 --- a/apis/shopper-promotions-oas-1.0.39/exchange.json +++ b/apis/shopper-promotions-oas-1.2.0/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Promotions OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-promotions-oas", - "version": "1.0.39", + "version": "1.2.0", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-promotions-oas-1.0.39/shopper-promotions-oas-v1-public.yaml b/apis/shopper-promotions-oas-1.2.0/shopper-promotions-oas-v1-public.yaml similarity index 98% rename from apis/shopper-promotions-oas-1.0.39/shopper-promotions-oas-v1-public.yaml rename to apis/shopper-promotions-oas-1.2.0/shopper-promotions-oas-v1-public.yaml index 9b0b5ff0..44fbe3ae 100644 --- a/apis/shopper-promotions-oas-1.0.39/shopper-promotions-oas-v1-public.yaml +++ b/apis/shopper-promotions-oas-1.2.0/shopper-promotions-oas-v1-public.yaml @@ -3,7 +3,7 @@ info: x-api-type: Shopper x-api-family: Pricing title: Shopper Promotions - version: 1.0.39 + version: 1.2.0 description: |- [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-promotions/shopper-promotions-oas-v1-public.yaml) @@ -78,6 +78,7 @@ paths: security: - ShopperToken: - sfcc.shopper-promotions + - sfcc.shopper-standard /organizations/{organizationId}/promotions/campaigns/{campaignId}: get: summary: Return an array of enabled promotions matching the specified filter criteria. @@ -125,6 +126,7 @@ paths: security: - ShopperToken: - sfcc.shopper-promotions + - sfcc.shopper-standard components: securitySchemes: ShopperToken: @@ -166,9 +168,8 @@ components: DefaultFallback: default: default description: A specialized value indicating the system default values for locales. + pattern: ^default$ example: default - enum: - - default type: string LocaleCode: description: A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified. @@ -315,9 +316,9 @@ components: - title - type - detail - ISOCurrency: - pattern: ^[A-Z][A-Z][A-Z]$ - description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard. + CurrencyCode: + description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable. + pattern: ^([A-Z][A-Z][A-Z]|N/A)$ example: USD type: string parameters: @@ -388,7 +389,7 @@ components: description: The currency mnemonic specified for price. This parameter is effective only for product suggestions. required: false schema: - $ref: '#/components/schemas/ISOCurrency' + $ref: '#/components/schemas/CurrencyCode' examples: PromotionsResult: value: diff --git a/apis/shopper-search-oas-1.5.4/exchange.json b/apis/shopper-search-oas-1.8.0/exchange.json similarity index 93% rename from apis/shopper-search-oas-1.5.4/exchange.json rename to apis/shopper-search-oas-1.8.0/exchange.json index 1c17ba31..60dccd9a 100644 --- a/apis/shopper-search-oas-1.5.4/exchange.json +++ b/apis/shopper-search-oas-1.8.0/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Search OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-search-oas", - "version": "1.5.4", + "version": "1.8.0", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-search-oas-1.5.4/shopper-search-oas-v1-public.yaml b/apis/shopper-search-oas-1.8.0/shopper-search-oas-v1-public.yaml similarity index 85% rename from apis/shopper-search-oas-1.5.4/shopper-search-oas-v1-public.yaml rename to apis/shopper-search-oas-1.8.0/shopper-search-oas-v1-public.yaml index 58aea3f2..d39941de 100644 --- a/apis/shopper-search-oas-1.5.4/shopper-search-oas-v1-public.yaml +++ b/apis/shopper-search-oas-1.8.0/shopper-search-oas-v1-public.yaml @@ -3,8 +3,8 @@ info: x-api-type: Shopper x-api-family: Search title: Shopper Search - version: 1.5.4 - description: "[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-search/shopper-search-oas-v1-public.yaml)\n\n# API Overview\n\nUse the Shopper Search API for search functionality that lets shoppers search for products using keywords and refinement. The search results can be products or suggestions based on the endpoint you choose in the API.\n\nCaching is provided for the Shopper Search API. For details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html)\n\n## Authentication & Authorization\n\nThe client requesting the API must have access to the product search and search suggestion resources. \n\nThe Shopper Search API requires a JWT acquired via the Shopper Customers endpoint:\n\n```\nhttps://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/v1/organizations/{organizationId}/customers/actions/login\n```\n\n## Use Cases\n\n### Provide Search Suggestions\n\nUse the Shopper Search API to provide search suggestions as a shopper searches.\n\nFor example, a developer who is building a shopping app using the Salesforce Commerce API would like to provide product, brand, and category suggestions. When a shopper types in a search phrase that exceeds a definable minimum length and the GET Search Suggestion endpoint is requested, the platform delivers a set of suggestions with products (name, ID), brands (name), and categories (name, ID). Shoppers can reach their desired search results more quickly using the suggested completion and correction.\n\n### Provide Search Results\n\nUse the Shopper Search API to gather product results for a shoppers search query.\n\nFor example, a developer who is building a shopping app using the Salesforce Commerce API would like to implement a product search functionality. When a shopper enters a search phrase and the GET Product Search endpoint is requested, the platform performs a keyword search and a sorted search result is returned. The sorted search result can be refined according to given values (for example, a price range).\nThe product search result contains a definable number of product search hits. A product search hit describes a matching product with its ID and name. Furthermore, the search hit contains product images, prices, represented products, and variations. In addition to the search hits, the search results also deliver refinement and sorting options.\n\n### Retrieve Promotion Information\n\nNote: This only applies if `promotions` expand is provided in the query parameter.\n\nPromotions provide discounts to shoppers when they meet certain purchase requirements.\n\nPromotion information is described in detail in [Promotion Details](https://developer.salesforce.com/docs/commerce/commerce-api/guide/promotion-details.html), but the following list provides several key points:\n\n- Pricing discounts for basket and shipping promotions are NEVER returned by the 'getProduct' or 'getProducts' endpoint.\n- Promotional pricing is ONLY returned for products that are included with non-conditional promotions.\n- Callout messages are ALWAYS returned by the 'getProduct' and 'getProducts' endpoints.\n\nBy default, 'getProduct' and 'getProducts' return promotion information for a queried product. Promotion information includes both pricing and callout message information. However, the specific pricing and callout information that is fetched is determined by:\n\n- Promotion Type\n- Product Type\n- Product Purchase Requirements\n\nSome promotions can be displayed on a Product Data Page (PDP) or Product Listing page (PLP), while other promotions are displayed in the context of a basket, such as an order level promotion: \"add the product to your basket to view price information\". It is important to understand what is included in the response when designing a PDP or PLP on top of SCAPI to ensure your design aligns with implementable features.\n\nNote: When you search for a variant product, the Product Search API returns the master or main product as the primary search hit. When promotion data (productPromotion) is returned, it does not contain pricing information because the returned product is the main product. To retrieve pricing information, pass the query string `allVariationProperties=true` with the `promotions` expand parameter, which returns pricing data for variant products if the promotion is unconditional. The `allVariationProperties` flag specifies the variation properties to be included in the result.\n\n### Filter Products by Promotion Role\n\nYou can filter products by their role in a promotion using the `pmid` (promotion ID) and `pmpt` (promotion product type) refinement parameters together. This allows you to find specific types of products within a promotion:\n\n- **`pmid`**: Specifies the promotion ID to filter by\n- **`pmpt`**: Specifies the type of products to return within that promotion:\n - `all`: Returns all products related to the promotion (default behavior)\n - `qualifying`: Returns only products that qualify for the promotion but don't receive the discount/bonus\n - `discounted`: Returns only products that receive a discount in the promotion \n - `bonus`: Returns only products that are given as bonuses in the promotion\n\n**Example Usage:**\n```\nGET /organizations/{organizationId}/product-search?refine=pmid=summer-sale&refine=pmpt=discounted\n```\n\nThis would return only the products that receive discounts in the \"summer-sale\" promotion.\n\n**Note:** The `pmpt` parameter only has an effect when used with `pmid`. If `pmpt` is specified without `pmid`, it will be ignored and all products will be returned.\n\n#### Shopper Personalization\nThe SCAPI response can be personalized using the Shopper Context API or hooks. By setting specific values in the Shopper Context API, you can modify the response of the 'getProduct' or 'getProducts' endpoint based on the shopper's context. For instance, you can offer a 5% discount or free shipping to shoppers using mobile devices.\n\n#### JWA Caching\nThe response is cached in JWA, which means promotion data contained in the response is also cached based on the TTL (Time to Live) specified in the Business Manager [Feature Switches](https://help.salesforce.com/s/articleView?id=cc.b2c_feature_switches.htm&type=5) configuration.\nWhen the shopper context value is updated, a check is conducted to see if the updated shopper context affects the retrieval of product-promotion data. If it does, then the response is fetched from the source and cached in the JWA.\n\nFor details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html)\n\n\n### Use Hooks\n\nFor details working with hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html)\n\n## Best Practices\n\nThese best practices refer to features that are generally available with B2C Commerce 24.3.\n\nFor better performance, when you call the GET Product Search endpoint, we recommend that you:\n\n- Use the `select` query parameter to filter the response of a specified field or set of fields, and remove default outputs that you don't need. For example, filter the response to return only the relevant product names, ids, variants, and product IDs of the variants.\n- Limit API requests to the GET Product Search endpoint instead of calling both the GET Product Search and GET Products endpoints to show information on a product listing page (PLP). Use these features to provide the additional product information needed to render product tiles:\n - **Allowable value:** `promotions` value in the `expand` query parameter\n - **Query parameters:** `perPricebook`, `allImages`, and `allVariationProperties`\n - **Responses:** `productPromotions`, `imageGroups`, `priceRanges`, `tieredPrices`, `variants`, and `variationGroups`\n- Pass in only the `expand` values and query parameters that you consider necessary to meet your PLP requirements. Requesting large amounts of information can increase the latency, especially if there's a lot of data to be returned (for example, many imageGroups and variants)." + version: 1.8.0 + description: "[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-search/shopper-search-oas-v1-public.yaml)\n\n# API Overview\n\nUse the Shopper Search API for search functionality that lets shoppers search for products using keywords and refinement. The search results can be products or suggestions based on the endpoint you choose in the API.\n\nCaching is provided for the Shopper Search API. For details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html)\n\n## Authentication & Authorization\n\nThe client requesting the API must have access to the product search and search suggestion resources. \n\nThe Shopper Search API requires a JWT acquired via the Shopper Customers endpoint:\n\n```\nhttps://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/v1/organizations/{organizationId}/customers/actions/login\n```\n\nYou must include the relevant scopes in the client ID used to generate the SLAS token. For a full list of permissions, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html)\n\n## Use Cases\n\n### Provide Search Suggestions\n\nUse the Shopper Search API to provide search suggestions as a shopper searches.\n\nFor example, a developer who is building a shopping app using the Salesforce Commerce API would like to provide product, brand, and category suggestions. When a shopper types in a search phrase that exceeds a definable minimum length and the GET Search Suggestion endpoint is requested, the platform delivers a set of suggestions with products (name, ID), brands (name), and categories (name, ID). Shoppers can reach their desired search results more quickly using the suggested completion and correction.\n\n### Provide Search Results\n\nUse the Shopper Search API to gather product results for a shoppers search query.\n\nFor example, a developer who is building a shopping app using the Salesforce Commerce API would like to implement a product search functionality. When a shopper enters a search phrase and the GET Product Search endpoint is requested, the platform performs a keyword search and a sorted search result is returned. The sorted search result can be refined according to given values (for example, a price range).\nThe product search result contains a definable number of product search hits. A product search hit describes a matching product with its ID and name. Furthermore, the search hit contains product images, prices, represented products, and variations. In addition to the search hits, the search results also deliver refinement and sorting options.\n\n### Retrieve Promotion Information\n\nNote: This only applies if `promotions` expand is provided in the query parameter.\n\nPromotions provide discounts to shoppers when they meet certain purchase requirements.\n\nPromotion information is described in detail in [Promotion Details](https://developer.salesforce.com/docs/commerce/commerce-api/guide/promotion-details.html), but the following list provides several key points:\n\n- Pricing discounts for basket and shipping promotions are NEVER returned by the 'getProduct' or 'getProducts' endpoint.\n- Promotional pricing is ONLY returned for products that are included with non-conditional promotions.\n- Callout messages are ALWAYS returned by the 'getProduct' and 'getProducts' endpoints.\n\nBy default, 'getProduct' and 'getProducts' return promotion information for a queried product. Promotion information includes both pricing and callout message information. However, the specific pricing and callout information that is fetched is determined by:\n\n- Promotion Type\n- Product Type\n- Product Purchase Requirements\n\nSome promotions can be displayed on a Product Data Page (PDP) or Product Listing page (PLP), while other promotions are displayed in the context of a basket, such as an order level promotion: \"add the product to your basket to view price information\". It is important to understand what is included in the response when designing a PDP or PLP on top of SCAPI to ensure your design aligns with implementable features.\n\nNote: When you search for a variant product, the Product Search API returns the master or main product as the primary search hit. When promotion data (productPromotion) is returned, it does not contain pricing information because the returned product is the main product. To retrieve pricing information, pass the query string `allVariationProperties=true` with the `promotions` expand parameter, which returns pricing data for variant products if the promotion is unconditional. The `allVariationProperties` flag specifies the variation properties to be included in the result.\n\n### Filter Products by Promotion Role\n\nYou can filter products by their role in a promotion using the `pmid` (promotion ID) and `pmpt` (promotion product type) refinement parameters together. This allows you to find specific types of products within a promotion:\n\n- `pmid`: Specifies the promotion ID to filter by\n- `pmpt`: Specifies the type of products to return within that promotion:\n - `all`: Returns all products related to the promotion (default behavior)\n - `qualifying`: Returns only products that qualify for the promotion but don't receive the discount/bonus\n - `discounted`: Returns only products that receive a discount in the promotion \n - `bonus`: Returns only products that are given as bonuses in the promotion\n\nExample Usage:\n```\nGET /organizations/{organizationId}/product-search?refine=pmid=summer-sale&refine=pmpt=discounted\n```\n\nThis would return only the products that receive discounts in the \"summer-sale\" promotion.\n\n**Note:** The `pmpt` parameter only has an effect when used with `pmid`. If `pmpt` is specified without `pmid`, it will be ignored and all products will be returned.\n\n### Shopper Personalization\nThe SCAPI response can be personalized using the Shopper Context API or hooks. By setting specific values in the Shopper Context API, you can modify the response of the 'getProduct' or 'getProducts' endpoint based on the shopper's context. For instance, you can offer a 5% discount or free shipping to shoppers using mobile devices.\n\n## JWA Caching\nThe response is cached in JWA, which means promotion data contained in the response is also cached based on the TTL (Time to Live) specified in the Business Manager [Feature Switches](https://help.salesforce.com/s/articleView?id=cc.b2c_feature_switches.htm&type=5) configuration.\nWhen the shopper context value is updated, a check is conducted to see if the updated shopper context affects the retrieval of product-promotion data. If it does, then the response is fetched from the source and cached in the JWA.\n\nFor details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html)\n\n## Use Hooks\n\nFor details working with hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html)\n\n## Best Practices\n\nThese best practices refer to features that are generally available with B2C Commerce 24.3.\n\nFor better performance, when you call the GET Product Search endpoint, we recommend that you:\n\n- Use the `select` query parameter to filter the response of a specified field or set of fields, and remove default outputs that you don't need. For example, filter the response to return only the relevant product names, ids, variants, and product IDs of the variants.\n- Limit API requests to the GET Product Search endpoint instead of calling both the GET Product Search and GET Products endpoints to show information on a product listing page (PLP). Use these features to provide the additional product information needed to render product tiles:\n - **Allowable value:** `promotions` value in the `expand` query parameter\n - **Query parameters:** `perPricebook`, `allImages`, and `allVariationProperties`\n - **Responses:** `productPromotions`, `imageGroups`, `priceRanges`, `tieredPrices`, `variants`, and `variationGroups`\n- Pass in only the `expand` values and query parameters that you consider necessary to meet your PLP requirements. Requesting large amounts of information can increase the latency, especially if there's a lot of data to be returned (for example, many imageGroups and variants)." servers: - url: https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/v1 variables: @@ -62,6 +62,8 @@ paths: $ref: '#/components/examples/ProductSearchWithPromotionFilterExample' ProductSearchResultWithCustomVariationPropertiesExample: $ref: '#/components/examples/ProductSearchResultWithCustomVariationPropertiesExample' + ProductSearchWithProcessedQueryExample: + $ref: '#/components/examples/ProductSearchWithProcessedQueryExample' '400': description: Bad Request. content: @@ -76,6 +78,7 @@ paths: security: - ShopperToken: - sfcc.shopper-product-search + - sfcc.shopper-standard /organizations/{organizationId}/search-suggestions: get: summary: "Provides keyword-based search suggestions for products, categories, and brands. Returns suggested items for each \nbased on the search phrase." @@ -119,6 +122,7 @@ paths: security: - ShopperToken: - sfcc.shopper-product-search + - sfcc.shopper-standard components: securitySchemes: ShopperToken: @@ -153,11 +157,6 @@ components: description: The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites example: RefArch type: string - String256: - type: string - maxLength: 256 - description: "The String256 schema is a foundational schema designed for fields or attributes that are stored in a database field with a maximum capacity of 256 bytes. \nThis schema accommodates various character sets, with the following considerations:\n - ASCII Characters: Each ASCII character occupies 1 byte, allowing up to 256 characters.\n - Latin Characters: Many Latin characters require 2 bytes each, allowing up to 128 characters.\n - Asian Characters: Many Asian characters require 3 bytes each, allowing approximately 85 characters." - example: Max Mustermann CurrencyCode: description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable. pattern: ^([A-Z][A-Z][A-Z]|N/A)$ @@ -225,29 +224,24 @@ components: - limit - offset - total - String4000: - type: string - maxLength: 4000 - description: "The String4000 schema is a foundational schema designed for fields or attributes that are stored in a database field with a maximum capacity of 4000 bytes. \nThis schema accommodates various character sets, with the following considerations:\n - ASCII Characters: Each ASCII character occupies 1 byte, allowing up to 4000 characters.\n - Latin Characters: Many Latin characters require 2 bytes each, allowing up to 2000 characters.\n - Asian Characters: Many Asian characters require 3 bytes each, allowing approximately 1333 characters." - example: This is a detailed description of an Excellent Product. It includes all the features, specifications, and benefits of the product. The Excellent Product is designed to provide exceptional performance and reliability. It is made from high-quality materials and has been rigorously tested to ensure it meets the highest standards. Whether you are using it for personal or professional purposes, the Excellent Product is the perfect choice. With its advanced technology and user-friendly design, it offers unparalleled convenience and efficiency. Order your Excellent Product today and experience the difference it can make. Image: properties: alt: - allOf: - - $ref: '#/components/schemas/String4000' + type: string + maxLength: 4000 example: The White Dress Shirt disBaseLink: - allOf: - - $ref: '#/components/schemas/String4000' + type: string + maxLength: 4000 example: https://edge.disstg.commercecloud.salesforce.com/dw/image/v2/ZZEU_006/on/demandware.static/-/Sites-apparel-catalog/default/dw9368b001/images/large/70284588_100_0.jpg link: minLength: 1 - allOf: - - $ref: '#/components/schemas/String4000' + type: string + maxLength: 4000 example: https://zzeu-006.sandbox.us01.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-apparel-catalog/default/dw9368b001/images/large/70284588_100_0.jpg title: - allOf: - - $ref: '#/components/schemas/String4000' + type: string + maxLength: 4000 example: The White Dress Shirt required: - link @@ -301,8 +295,8 @@ components: properties: description: description: The localized description of the variation value. - allOf: - - $ref: '#/components/schemas/String4000' + type: string + maxLength: 4000 example: Size 15R image: description: The first product image for the configured viewtype and this variation value. @@ -314,8 +308,8 @@ components: - $ref: '#/components/schemas/Image' name: description: The localized display name of the variation value. - allOf: - - $ref: '#/components/schemas/String4000' + type: string + maxLength: 4000 example: 15R orderable: description: A flag indicating whether at least one variant with this variation attribute value is available to sell. @@ -324,8 +318,8 @@ components: value: minLength: 1 description: The actual variation value. - allOf: - - $ref: '#/components/schemas/String4000' + type: string + maxLength: 4000 example: 15R required: - value @@ -336,13 +330,13 @@ components: id: minLength: 1 description: The ID of the variation attribute. - allOf: - - $ref: '#/components/schemas/String256' + type: string + maxLength: 256 example: size name: description: The localized display name of the variation attribute. - allOf: - - $ref: '#/components/schemas/String4000' + type: string + maxLength: 4000 example: size values: description: The sorted array of variation values. This array can be empty. @@ -371,8 +365,7 @@ components: example: hi-res type: string minLength: 1 - allOf: - - $ref: '#/components/schemas/String256' + maxLength: 256 required: - images - viewType @@ -393,8 +386,8 @@ components: pricebook: description: The active pricebook from which the min and the max prices are calculated. The pricebook is based on the site context of the request as defined in ECOM. example: usd-list-pricebook - allOf: - - $ref: '#/components/schemas/String256' + type: string + maxLength: 256 type: object ProductPromotion: description: Document representing a product promotion. @@ -403,8 +396,8 @@ components: description: The localized call-out message of the promotion. example: Fantastic promotion minLength: 1 - allOf: - - $ref: '#/components/schemas/String4000' + type: string + maxLength: 4000 promotionId: description: The unique ID of the promotion. example: summerSale @@ -433,8 +426,8 @@ components: pricebook: description: The active pricebook for which this price is defined example: usd-list-pricebook - allOf: - - $ref: '#/components/schemas/String256' + type: string + maxLength: 256 quantity: format: double description: Quantity tier for which the price is defined. @@ -468,8 +461,8 @@ components: description: The actual variation attribute ID - value pairs. type: object additionalProperties: - allOf: - - $ref: '#/components/schemas/String4000' + type: string + maxLength: 4000 example: Beige productPromotions: description: |- @@ -513,8 +506,8 @@ components: type: object minLength: 1 additionalProperties: - allOf: - - $ref: '#/components/schemas/String4000' + type: string + maxLength: 4000 example: Beige required: - orderable @@ -529,8 +522,8 @@ components: $ref: '#/components/schemas/CurrencyCode' hitType: description: The type information for the search hit. - allOf: - - $ref: '#/components/schemas/String256' + type: string + maxLength: 256 example: product image: description: The first image of the product hit for the configured viewtype. @@ -561,8 +554,8 @@ components: productName: description: The localized name of the product. example: Modern Dress Shirt - allOf: - - $ref: '#/components/schemas/String4000' + type: string + maxLength: 4000 productType: description: The type information for the product. allOf: @@ -629,20 +622,55 @@ components: id: description: The ID of the Page Meta Tag. example: title - allOf: - - $ref: '#/components/schemas/String256' + type: string + maxLength: 256 value: description: Locale-specific value of the Page Meta Tag, evaluated by resolving the rule set for the given Business Manager ID. example: Buy the Long Sleeve Covered Placket Blouse for USD 61.99. type: string type: object + query: + description: The query string that was searched for. + type: string + maxLength: 50 + example: dresses + AppliedProcessor: + description: The result of a processor execution. + type: object + properties: + processorName: + description: The name of the processor. + example: Attribute Aware Search + type: string + maxLength: 256 + result: + $ref: '#/components/schemas/query' + refinements: + description: The refinements that were applied to the query. + type: object + additionalProperties: + type: string + maxLength: 256 + example: Beige + ProcessedQuery: + description: The result of query processing. + type: object + properties: + query: + $ref: '#/components/schemas/query' + appliedProcessors: + description: The processors that were executed for the search query and their results. + type: array + maxItems: 5 + items: + $ref: '#/components/schemas/AppliedProcessor' ProductSearchRefinementValue: description: Document representing a product search refinement value. properties: description: description: The localized description of the refinement value. - allOf: - - $ref: '#/components/schemas/String4000' + type: string + maxLength: 4000 example: The Beige objects hitCount: format: int32 @@ -653,23 +681,22 @@ components: label: description: The localized label of the refinement value. minLength: 1 - allOf: - - $ref: '#/components/schemas/String4000' + type: string + maxLength: 4000 example: Beige presentationId: description: |- The optional presentation ID associated with the refinement value. The presentation ID can be used, for example, to associate an ID with an HTML widget. - allOf: - - $ref: '#/components/schemas/String256' + type: string + maxLength: 256 example: beige value: description: "The refinement value. In the case of an attribute refinement, this is the bucket, the attribute value, or a \nvalue range. In the case of a category refinement, this is the category ID. In the case of a price \nrefinement, this is the price range. Ranges are enclosed by parentheses and delimited by \"..\"; for example, \n\"(100..999)\" and \"(Aa..Fa)\" are valid ranges." type: string minLength: 1 - allOf: - - $ref: '#/components/schemas/String4000' + maxLength: 4000 example: Beige values: description: The array of hierarchical refinement values. This array can be empty. @@ -691,13 +718,13 @@ components: category refinement, the ID must be "cgid". In the case of a price refinement, the ID must be "price". example: refinementColor minLength: 1 - allOf: - - $ref: '#/components/schemas/String256' + type: string + maxLength: 256 label: description: The localized label of the refinement. example: Color - allOf: - - $ref: '#/components/schemas/String256' + type: string + maxLength: 256 values: description: The sorted array of refinement values. This array can be empty. type: array @@ -808,14 +835,14 @@ components: id: description: The ID of the sorting option. minLength: 1 - allOf: - - $ref: '#/components/schemas/String256' + maxLength: 256 + type: string example: best-matches label: description: The localized label of the sorting option. minLength: 1 - allOf: - - $ref: '#/components/schemas/String4000' + maxLength: 4000 + type: string example: Best Matches required: - id @@ -842,6 +869,10 @@ components: type: string maxLength: 50 example: dresses + processedQuery: + description: The result of query processing. + allOf: + - $ref: '#/components/schemas/ProcessedQuery' refinements: description: The sorted array of search refinements. This array can be empty. type: array @@ -857,13 +888,13 @@ components: description: A map of selected refinement attribute ID or value pairs. The sorting order is the same as in request URL. type: object additionalProperties: - allOf: - - $ref: '#/components/schemas/String4000' + type: string + maxLength: 4000 example: Beige selectedSortingOption: description: The ID of the applied sorting option. - allOf: - - $ref: '#/components/schemas/String4000' + type: string + maxLength: 4000 example: best-matches sortingOptions: description: The sorted array of search sorting options. This array can be empty. @@ -936,14 +967,14 @@ components: name: description: The localized name of the category. minLength: 1 - allOf: - - $ref: '#/components/schemas/String4000' + type: string + maxLength: 4000 example: Dresses parentCategoryName: description: The name of the parent category. minLength: 1 - allOf: - - $ref: '#/components/schemas/String4000' + type: string + maxLength: 4000 example: Clothing required: - id @@ -989,8 +1020,8 @@ components: productName: description: The localized name of the product. minLength: 1 - allOf: - - $ref: '#/components/schemas/String4000' + type: string + maxLength: 4000 example: Playstation 3 Bundle required: - currency @@ -1125,8 +1156,8 @@ components: required: false schema: example: brand - allOf: - - $ref: '#/components/schemas/String256' + type: string + maxLength: 256 currency: description: A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable. name: currency @@ -1201,8 +1232,7 @@ components: type: string example: c_batteryLife pattern: ^c_.* - allOf: - - $ref: '#/components/schemas/String256' + maxLength: 256 type: array maxItems: 5 qSearchSuggestion: @@ -1250,8 +1280,7 @@ components: type: string example: c_batteryLife pattern: ^c_.* - allOf: - - $ref: '#/components/schemas/String256' + maxLength: 256 type: array maxItems: 5 includeEinsteinSuggestedPhrases: @@ -1617,6 +1646,57 @@ components: label: Best Matches offset: 0 total: 1 + ProductSearchWithProcessedQueryExample: + summary: Product search result demonstrating processors being executed on the search query. + value: + limit: 1 + hits: + - hitType: master + productId: portable-media-player + productName: Portable Media Player + productType: + master: true + representedProduct: + id: media-player-purple-8gb + variants: + - productId: media-player-silver-8gb + variationValues: + color: Silver + memorySize: 8 GB + c_badges: + - Popular + c_mediaFormat: + - '0020' + - '0050' + c_musicStorage: 2,000 songs + - productId: media-player-purple-8gb + variationValues: + color: Purple + memorySize: 8 GB + c_badges: + - Best Seller + c_mediaFormat: + - '0010' + - '0020' + - '0030' + c_musicStorage: 2,000 songs + processedQuery: + appliedProcessors: + - processorName: Attribute Aware Search + refinements: + price: (..200) + result: media player purple + query: media player purple + query: media player purple under 200 + refinements: [] + searchPhraseSuggestions: + suggestedPhrases: [] + suggestedTerms: [] + sortingOptions: + - id: best-matches + label: Best Matches + offset: 0 + total: 1 MalformedSelectorGetProductsSearchForSelect: value: title: Malformed Selector diff --git a/apis/shopper-stores-oas-1.0.19/exchange.json b/apis/shopper-stores-oas-1.2.0/exchange.json similarity index 93% rename from apis/shopper-stores-oas-1.0.19/exchange.json rename to apis/shopper-stores-oas-1.2.0/exchange.json index f2462500..c1475ac5 100644 --- a/apis/shopper-stores-oas-1.0.19/exchange.json +++ b/apis/shopper-stores-oas-1.2.0/exchange.json @@ -3,7 +3,7 @@ "name": "Shopper Stores OAS", "groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8", "assetId": "shopper-stores-oas", - "version": "1.0.19", + "version": "1.2.0", "classifier": "oas", "tags": [], "descriptorVersion": "1.0.0", diff --git a/apis/shopper-stores-oas-1.0.19/shopper-stores-oas-v1-public.yaml b/apis/shopper-stores-oas-1.2.0/shopper-stores-oas-v1-public.yaml similarity index 99% rename from apis/shopper-stores-oas-1.0.19/shopper-stores-oas-v1-public.yaml rename to apis/shopper-stores-oas-1.2.0/shopper-stores-oas-v1-public.yaml index b3e91e86..b905c552 100644 --- a/apis/shopper-stores-oas-1.0.19/shopper-stores-oas-v1-public.yaml +++ b/apis/shopper-stores-oas-1.2.0/shopper-stores-oas-v1-public.yaml @@ -3,7 +3,7 @@ info: x-api-type: Shopper x-api-family: Store title: Shopper Stores - version: 1.0.19 + version: 1.2.0 description: |- [Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-stores/shopper-stores-oas-v1-public.yaml) @@ -73,6 +73,7 @@ paths: security: - ShopperToken: - sfcc.shopper-stores + - sfcc.shopper-standard /organizations/{organizationId}/store-search: get: summary: Retrieve a list of stores for the given site that are within a configured distance of a geolocation. @@ -135,6 +136,7 @@ paths: security: - ShopperToken: - sfcc.shopper-stores + - sfcc.shopper-standard components: securitySchemes: ShopperToken: diff --git a/package.json b/package.json index a1bdd834..714b1100 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "commerce-sdk-isomorphic", - "version": "5.0.0", + "version": "5.1.0", "private": false, "description": "Salesforce Commerce SDK Isomorphic", "bugs": { diff --git a/scripts/generate-oas.ts b/scripts/generate-oas.ts index cda74734..f57e3695 100644 --- a/scripts/generate-oas.ts +++ b/scripts/generate-oas.ts @@ -51,6 +51,8 @@ export function resolveApiName(name: string, version: string): string { apiName = 'ShopperSEO'; } else if (name === 'Shopper Context OAS') { apiName = 'ShopperContexts'; + } else if (name === 'Auth OAS') { + apiName = 'ShopperLogin'; } else { apiName = name.replace(/\s+/g, '').replace('OAS', ''); } @@ -58,6 +60,14 @@ export function resolveApiName(name: string, version: string): string { return version !== 'v1' ? apiName + version.toUpperCase() : apiName; } +function resolveDirectoryName(name: string, version?: string): string { + let currentName = name; + if (name === 'auth') { + currentName = 'shopperLogin'; + } + return kebabToCamelCase(appendVersionIfV2(currentName, version || '')); +} + /** * Extracts details needed for API generation from the exchange.json file contained within the given directory * @param directory - The directory containing the exchange.json file @@ -73,11 +83,9 @@ export function getAPIDetailsFromExchange(directory: string): ApiSpecDetail { return { filepath: path.join(directory, exchangeConfig.main), filename: exchangeConfig.main, - directoryName: kebabToCamelCase( - appendVersionIfV2( - exchangeConfig.assetId.replace('-oas', ''), - exchangeConfig.apiVersion - ) + directoryName: resolveDirectoryName( + exchangeConfig.assetId.replace('-oas', ''), + exchangeConfig.apiVersion ), name: exchangeConfig.apiVersion === 'v2' @@ -94,7 +102,10 @@ export function getAPIDetailsFromExchange(directory: string): ApiSpecDetail { */ export function generateSDKs(apiSpecDetail: ApiSpecDetail): void { const {filepath, name, directoryName} = apiSpecDetail; - if (fs.statSync(filepath).isFile() && filepath.includes('shopper')) { + if ( + fs.statSync(filepath).isFile() && + (filepath.includes('shopper') || filepath.includes('auth')) + ) { try { console.log(`Generating SDK for ${name}`); const outputDir = `${TARGET_DIRECTORY}/${directoryName}`; diff --git a/templatesOas/apis.mustache b/templatesOas/apis.mustache index 3e4baa93..a30bd325 100644 --- a/templatesOas/apis.mustache +++ b/templatesOas/apis.mustache @@ -46,9 +46,9 @@ import type { {{/operation}} {{/operations}} /** - * All path parameters that are used by at least one {{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}} method. + * All path parameters that are used by at least one {{#vendorExtensions}}{{#x-sdk-classname}}{{{ . }}}{{/x-sdk-classname}}{{^x-sdk-classname}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/x-sdk-classname}}{{/vendorExtensions}}{{^vendorExtensions}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/vendorExtensions}} method. */ -export type {{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}PathParameters = Partial< +export type {{#vendorExtensions}}{{#x-sdk-classname}}{{{ . }}}{{/x-sdk-classname}}{{^x-sdk-classname}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/x-sdk-classname}}{{/vendorExtensions}}{{^vendorExtensions}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/vendorExtensions}}PathParameters = Partial< {{#operations}} {{#operation}} {{#vendorExtensions}} @@ -65,9 +65,9 @@ export type {{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camel >; /** - * All query parameters that are used by at least one {{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}} method. + * All query parameters that are used by at least one {{#vendorExtensions}}{{#x-sdk-classname}}{{{ . }}}{{/x-sdk-classname}}{{^x-sdk-classname}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/x-sdk-classname}}{{/vendorExtensions}}{{^vendorExtensions}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/vendorExtensions}} method. */ -export type {{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}QueryParameters = Partial< +export type {{#vendorExtensions}}{{#x-sdk-classname}}{{{ . }}}{{/x-sdk-classname}}{{^x-sdk-classname}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/x-sdk-classname}}{{/vendorExtensions}}{{^vendorExtensions}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/vendorExtensions}}QueryParameters = Partial< {{#operations}} {{#operation}} {{#vendorExtensions}} @@ -84,9 +84,18 @@ export type {{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camel >; /** - * All parameters that are used by {{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}. + * All parameters that are used by {{#vendorExtensions}}{{#x-sdk-classname}}{{{ . }}}{{/x-sdk-classname}}{{^x-sdk-classname}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/x-sdk-classname}}{{/vendorExtensions}}{{^vendorExtensions}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/vendorExtensions}}. */ -export type {{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}Parameters = {{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}PathParameters & BaseUriParameters & {{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}QueryParameters; +export type {{#vendorExtensions}}{{#x-sdk-classname}}{{{ . }}}{{/x-sdk-classname}}{{^x-sdk-classname}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/x-sdk-classname}}{{/vendorExtensions}}{{^vendorExtensions}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/vendorExtensions}}Parameters = {{#vendorExtensions}}{{#x-sdk-classname}}{{{ . }}}{{/x-sdk-classname}}{{^x-sdk-classname}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/x-sdk-classname}}{{/vendorExtensions}}{{^vendorExtensions}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/vendorExtensions}}PathParameters & BaseUriParameters & {{#vendorExtensions}}{{#x-sdk-classname}}{{{ . }}}{{/x-sdk-classname}}{{^x-sdk-classname}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/x-sdk-classname}}{{/vendorExtensions}}{{^vendorExtensions}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/vendorExtensions}}QueryParameters; + +{{! When x-sdk-classname differs from appName, emit backward-compatible aliases so references using appName still resolve }} +{{#vendorExtensions}} +{{#x-sdk-classname}} +export type {{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}PathParameters = {{{ . }}}PathParameters; +export type {{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}QueryParameters = {{{ . }}}QueryParameters; +export type {{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}Parameters = {{{ . }}}Parameters; +{{/x-sdk-classname}} +{{/vendorExtensions}} /** * [{{appName}}](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta={{#lambda.kebabcase}}{{appName}}{{/lambda.kebabcase}}:Summary) @@ -117,7 +126,7 @@ export type {{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camel * * */ -export class {{#vendorExtensions}}{{#x-sdk-classname}}{{{ . }}}{{/x-sdk-classname}}{{^x-sdk-classname}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/x-sdk-classname}}{{/vendorExtensions}}{{^vendorExtensions}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/vendorExtensions}}> { +export class {{#vendorExtensions}}{{#x-sdk-classname}}{{{ . }}}{{/x-sdk-classname}}{{^x-sdk-classname}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/x-sdk-classname}}{{/vendorExtensions}}{{^vendorExtensions}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/vendorExtensions}}> { // baseUri is not required on ClientConfig, but we know that we provide one in the class constructor public clientConfig: ClientConfig & { baseUri: string }; diff --git a/templatesOas/index.mustache b/templatesOas/index.mustache index 41ec049b..246f8063 100644 --- a/templatesOas/index.mustache +++ b/templatesOas/index.mustache @@ -13,8 +13,8 @@ import type * as {{#apiInfo}}{{#apis.0}}{{#vendorExtensions}}{{#x-sdk-classname} export namespace {{#apiInfo}}{{#apis.0}}{{#vendorExtensions}}{{#x-sdk-classname}}{{{ . }}}{{/x-sdk-classname}}{{^x-sdk-classname}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/x-sdk-classname}}{{/vendorExtensions}}{{^vendorExtensions}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/vendorExtensions}}{{/apis.0}}{{/apiInfo}}Types { // API types - export type {{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}PathParameters = {{#apiInfo}}{{#apis.0}}{{#vendorExtensions}}{{#x-sdk-classname}}{{{ . }}}{{/x-sdk-classname}}{{^x-sdk-classname}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/x-sdk-classname}}{{/vendorExtensions}}{{^vendorExtensions}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/vendorExtensions}}{{/apis.0}}{{/apiInfo}}ApiTypes.{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}PathParameters - export type {{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}QueryParameters = {{#apiInfo}}{{#apis.0}}{{#vendorExtensions}}{{#x-sdk-classname}}{{{ . }}}{{/x-sdk-classname}}{{^x-sdk-classname}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/x-sdk-classname}}{{/vendorExtensions}}{{^vendorExtensions}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/vendorExtensions}}{{/apis.0}}{{/apiInfo}}ApiTypes.{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}QueryParameters + export type {{#apiInfo}}{{#apis.0}}{{#vendorExtensions}}{{#x-sdk-classname}}{{{ . }}}{{/x-sdk-classname}}{{^x-sdk-classname}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/x-sdk-classname}}{{/vendorExtensions}}{{^vendorExtensions}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/vendorExtensions}}{{/apis.0}}{{/apiInfo}}PathParameters = {{#apiInfo}}{{#apis.0}}{{#vendorExtensions}}{{#x-sdk-classname}}{{{ . }}}{{/x-sdk-classname}}{{^x-sdk-classname}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/x-sdk-classname}}{{/vendorExtensions}}{{^vendorExtensions}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/vendorExtensions}}{{/apis.0}}{{/apiInfo}}ApiTypes.{{#apiInfo}}{{#apis.0}}{{#vendorExtensions}}{{#x-sdk-classname}}{{{ . }}}{{/x-sdk-classname}}{{^x-sdk-classname}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/x-sdk-classname}}{{/vendorExtensions}}{{^vendorExtensions}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/vendorExtensions}}{{/apis.0}}{{/apiInfo}}PathParameters + export type {{#apiInfo}}{{#apis.0}}{{#vendorExtensions}}{{#x-sdk-classname}}{{{ . }}}{{/x-sdk-classname}}{{^x-sdk-classname}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/x-sdk-classname}}{{/vendorExtensions}}{{^vendorExtensions}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/vendorExtensions}}{{/apis.0}}{{/apiInfo}}QueryParameters = {{#apiInfo}}{{#apis.0}}{{#vendorExtensions}}{{#x-sdk-classname}}{{{ . }}}{{/x-sdk-classname}}{{^x-sdk-classname}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/x-sdk-classname}}{{/vendorExtensions}}{{^vendorExtensions}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/vendorExtensions}}{{/apis.0}}{{/apiInfo}}ApiTypes.{{#apiInfo}}{{#apis.0}}{{#vendorExtensions}}{{#x-sdk-classname}}{{{ . }}}{{/x-sdk-classname}}{{^x-sdk-classname}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/x-sdk-classname}}{{/vendorExtensions}}{{^vendorExtensions}}{{#lambda.titlecase}}{{#lambda.camelcase}}{{appName}}{{/lambda.camelcase}}{{/lambda.titlecase}}{{/vendorExtensions}}{{/apis.0}}{{/apiInfo}}QueryParameters {{#apiInfo}} {{#apis}} {{#operations}}