### Sample GET Request for Inspection Deposits Source: https://developer.shell.com/api-catalog/shell-lube-monitor-marine-engine-monitoring-api/quick-start-guide This example demonstrates how to request the most recent inspection data for a specific vessel and engine. Ensure you have valid authentication credentials. ```http GET /inspection-deposits?laVesselCode=136246&engineNo=1&latestSample=true Host: api.shell.com/gcc/lubemonitor Username: user@shell.com Password: password123 Authorization: Bearer hbGciOiJSUzI1NiIsImtpZCI6 ``` -------------------------------- ### Start Charging Session Source: https://developer.shell.com/api-catalog/ev-public-locations/sdk Initiates a charging session at a Shell Recharge location. ```APIDOC ## startChargesession(String clientid, String clientSecret, String EvChargeNumber, String EvseId) ### Description This API Method allows starting a charging session using the EVSE ID and EV Number. ### Method Signature `startChargesession(String clientid, String clientSecret, String EvChargeNumber, String EvseId)` ### Parameters - **clientid** (String) - Required - The client ID for authentication. - **clientSecret** (String) - Required - The client secret for authentication. - **EvChargeNumber** (String) - Required - The EV charge number. - **EvseId** (String) - Required - The EVSE ID. ``` -------------------------------- ### Error Handling Examples Source: https://developer.shell.com/api-catalog/shell-authentication/quick-start-guide-0 Examples of common authentication error responses. ```APIDOC ### Error Responses #### HTTP 400 - Bad Request ```json { "ErrorCode": "invalid_request", "Error": "Unsupported grant type : client_credential" } ``` #### HTTP 401 - Unauthorized ```json { "ErrorCode": "invalid_client", "Error": "ClientId is Invalid" } ``` ``` -------------------------------- ### Sample Response for Active Charge Sessions Source: https://developer.shell.com/api-catalog/b2b-ev-charge-sessions/quick-start-guide This is an example of the JSON response you will receive when successfully querying for active charge sessions. It includes details such as EMAId, EVSEId, session ID, start time, and status. ```json [ { "emaId": "NL-TNM-C0216599X-A", "evseId": "NL*TNM*EVIRTUALCP0002*0", "id": "2f0c91f5-9b17-481f-9a71-ce1d9d188998", "startedAt": "2022-02-22T10:46:38.975Z", "state": { "status": "started" }, "userId": "96f69b3b-8ad4-487a-baaa-f1d3db741e88" } ] ``` -------------------------------- ### Start Charging Session Source: https://developer.shell.com/api-catalog/ev-public-locations/sdk Initiates a charging session for an electric vehicle at a specified charging station. ```APIDOC ## Start Charging Session ### Description Initiates a charging session for an electric vehicle at a specified EVSE (Electric Vehicle Supply Equipment). ### Method `startChargesession(String client_id, String client_secret, String EVChargeNumber, String EvseId)` ### Parameters - **client_id** (String) - Required - Your application's client ID. - **client_secret** (String) - Required - Your application's client secret. - **EVChargeNumber** (String) - Required - The identifier for the EV charging session. - **EvseId** (String) - Required - The unique identifier of the EVSE where the charging will occur. ### Request Example ```java String client_id = "******************"; String client_secret = "******************"; String EVChargeNumber = "NL-TNM-216599-x"; String EvseId = "NL*TNM*EVIRTUALCP0002*0"; EVLocations ev = new EVLocations("test"); System.out.println(ev.startChargesession(client_id,client_secret, EVChargeNumber, EvseId)); ``` ### Response Indicates the status or result of initiating the charging session. ``` -------------------------------- ### Get Order Details Source: https://developer.shell.com/zh-hans/api-catalog/lubricants-order-management/quick-start-guide-0 This endpoint allows you to retrieve the details of a specific order. ```APIDOC ## POST /commerce/orders/distributor/orderDetails ### Description Retrieves the details for a specific order based on the order number and distributor sold-to information. ### Method POST ### Endpoint /commerce/orders/distributor/orderDetails ### Request Body - **orderNumber** (string) - Required - The unique identifier for the order. - **distributorSoldTo** (string) - Required - The sold-to identifier for the distributor. ### Request Example { "orderNumber": "0100069674", "distributorSoldTo": "0011243753" } ### Response #### Success Response (200) - **orderNumber** (string) - The order number. - **distributorSoldTo** (string) - The distributor sold-to identifier. - **orderStatus** (string) - The current status of the order. - **orderDate** (string) - The date the order was placed. - **items** (array) - A list of items in the order. - **itemNumber** (string) - The item number. - **description** (string) - The item description. - **quantity** (number) - The quantity ordered. - **unitPrice** (number) - The price per unit. #### Response Example { "orderNumber": "0100069674", "distributorSoldTo": "0011243753", "orderStatus": "Shipped", "orderDate": "2023-05-25T10:00:00Z", "items": [ { "itemNumber": "12345", "description": "Premium Motor Oil", "quantity": 10, "unitPrice": 25.50 } ] } ``` -------------------------------- ### Get Product Order Details Source: https://developer.shell.com/zh-hans/api-catalog/lubricants-order-management/quick-start-guide-0 Retrieve details about a specific lubricant order based on product number and other criteria. This endpoint allows you to check Minimum Order Quantity (MOQ), sales unit of measure, and supply plant availability. ```APIDOC ## GET /orders/MOQ/{productNumber} ### Description Retrieves Minimum Order Quantity (MOQ), sales unit of measure, and supply plant check status for a given product. ### Method GET ### Endpoint {Shell Lubricants Environment}/orders/MOQ/{productNumber} ### Parameters #### Path Parameters - **productNumber** (Number) - Mandatory - This is Shell product number with leading zeros. The length allowed is 18. Example: 000000000550015855 #### Query Parameters - **businessCategory** (string) - Mandatory - This is the combination of soldTo, distChannel and division fields combined with an underscore. Example: SG88_04_03 - **fields** (string) - Optional - This is the list of fields requested and is a static value. Example: default - **quantity** (string) - Mandatory - This is the quantity ordered. Example: 2 - **shipTo** (string) - Mandatory - This is the party who receives delivery of the goods. The length allowed is 10. Example: 0011935431 - **soldTo** (string) - Mandatory - This is the customer who orders goods or services. The length allowed is 10. Example: 0010763980 - **unit** (string) - Mandatory - This is the unit of measure in which the product is sold. Example: EA, L #### Headers - **client_id** (string) - Required - API Client ID - **client_secret** (string) - Required - API Client Secret - **Authorization** (string) - Required - Bearer **access_token** (Access Token generated from the OAuth end point) - **RequestId** (string) - Required - RequestId must be unique identifier value that can be used by the consumer to correlate each request/response. - **apiKey** (string) - Required - A unique Shell API key ### Request Example ```curl curl --location --request GET 'https://api-dev.shell.com/commerce/orders/MOQ/000000000500011357?businessCategory=SG88_04_03&fields=DEFAULT&quantity=1000&shipTo=0010398264&soldTo=0012044507&unit=L' \ --header 'RequestId: 9d2dee33-7803-485a-a2b1-2c7538e597ee' \ --header 'client_secret: 1wqPjAu7E+TlunglLD8sF3Lm5BG6vCxbVqEntR4g6jo=' \ --header 'client_id: e6918f7a-f004-498b-acfb-95058c750c51' \ --header 'apiKey: 6M4LdZEDloUYhAPY62qzVe5vyqk4iVka' \ --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6InBhSVluWUIyUzl3V1k2NFQ5eW5melBxWGs2dyIsInBpLmF0bSI6ImZ4eGcifQ.eyJzY29wZSI6IiIsImNsaWVudF9pZCI6ImU2OTE4ZjdhLWYwMDQtNDk4Yi1hY2ZiLTk1MDU4Yzc1MGM1MSIsImlzcyI6Imh0dHBzOi8vc3NvLWRldi5zaGVsbC5jb20iLCJhdWQiOiIiLCJzdWIiOiJ0ZXN0IiwibmJmIjoxNjg1MDEyMDg5LCJPcmdOYW1lIjoiU0hFTEwuQ09NIiwiaWF0IjoxNjg1MDExOTY5LCJleHAiOjE2ODUwMTI5ODl9.f331awTy-GOyrUq2etu5VgzAbyUZiw5_56SVF_rywQ_PQJN4a4wdWCtU-B-N4yk5eQTd9TbgRfmDNUgUjs0BEz26Yv-vycfO-zk3oiPrLF7HL3WFhU8fvjG7NdRcNQu4jCTj5baWgjQVI5Ch-GM-UoihDcqb8KcpBkqS1r17GnYvaTLXGEGioHiY7A-ieAfrdB3rKuXzmguzV60vTx_kKvi73R5BJ_lSs_0GZYRoj9pqzlJF-Maz7mgAhm25AfU9-QGFLO-zH8b3RRec2Upwc_EQgI9raf3faW0h2EgzECK9s2i6f6oIw8waBnophrQdo5KNtmC9QPb9dAUCUisTnw' \ --header 'Cookie: PF=7xhcbD7bIffFHwbQQOUPHv; ROUTE=.api-7d59dcdf69-zdqmb' ``` ### Response #### Success Response (200) - **moq** (string) - The minimum order quantity for the product. - **salesUOM** (string) - The sales unit of measure for the product. - **supplyPlantCheck** (boolean) - Indicates if the supply plant check was successful. #### Response Example ```json { "moq": "2000.000", "salesUOM": "L", "supplyPlantCheck": true } ``` ``` -------------------------------- ### Search a Document Source: https://developer.shell.com/zh-hans/api-catalog/lubricants-order-management/quick-start-guide-0 This API fetches the details of a document. You need to pass order number as URI parameter to get the document details. ```APIDOC ## GET /documents/Search/{soldTo}/{orderNumber} ### Description This API fetches the details of a document. You need to pass order number as URI parameter to get the document details. ### Method GET ### Endpoint {Shell Lubricants Environment}/documents/Search/{soldTo}/{orderNumber} ### Parameters #### Path Parameters - **soldTo** (string) - Mandatory - This is the number that uniquely identifies the soldTo for which the document belongs for an order. - **orderNumber** (string) - Mandatory - This is the number that uniquely identifies the order for which the document is fetched. The length allowed is 9. #### Headers - **client_id** (string) - API Client ID - **client_secret** (string) - API Client Secret - **Authorization** (string) - Bearer **access_token** (Access Token generated from the OAuth end point) - **RequestId** (string) - RequestId must be unique identifier value that can be used by the consumer to correlate each request/response. - **apiKey** (string) - A unique Shell API key ``` -------------------------------- ### Get Latest Engine Data Request Source: https://developer.shell.com/api-catalog/shell-lube-monitor-marine-engine-monitoring-api/quick-start-guide Example GET request to retrieve the latest onboard engine monitoring data for a specific vessel and engine. Set `latestSample=true` for this purpose. ```http GET /onboard-sample?laVesselCode=61301&engineNo=1&latestSample=true Host: api.shell.com/gcc/lubemonitor Username: user@shell.com Password: password123 Authorization: Bearer hbGciOiJSUzI1NiIsImtpZCI6 ``` -------------------------------- ### Initialize Shell EV API Client with Client Credentials Source: https://developer.shell.com/product-catalog/shell-ev/sdk Initialize the API client using OAuth 2.0 Client Credentials Grant. This example sets up authentication with client ID and secret, and specifies the production environment. ```csharp ShellEVClient client = new ShellEVClient.Builder() .ClientCredentialsAuth( new ClientCredentialsAuthModel.Builder( "OAuthClientId", "OAuthClientSecret" ) .Build()) .Environment(ShellEV.Standard.Environment.Production) .Build(); ``` -------------------------------- ### Install Shell EV SDK using .NET CLI Source: https://developer.shell.com/product-catalog/shell-ev/sdk Use this command to add the Shell EV SDK package to your .NET project. ```bash dotnet add package sdksio.EvRechargeSDK --version 1.3.0 ``` -------------------------------- ### Retrieve Fuel Locations Source: https://developer.shell.com/api-catalog/b2b-mobility-sites/quick-start-guide This example demonstrates how to retrieve a list of fuel station locations using a GET request. You can filter by country code and specify pagination parameters. ```APIDOC ## GET /locations/v1/fuel ### Description Retrieves a list of fuel station locations. Supports filtering by country code and pagination. ### Method GET ### Endpoint /locations/v1/fuel ### Query Parameters - **page** (integer) - Optional - The page number for pagination. - **pageSize** (integer) - Optional - The number of results per page. - **countryCode** (string) - Optional - Filters results by country code. Can be specified multiple times for multiple countries. ### Request Example ```curl curl --location --request GET 'https://api-test.shell.com/locations/v1/fuel?page=1&pageSize=1&countryCode=GB&countryCode=DE' \ --header 'RequestId: 233e4567-e89b-12d3-a456-426614174000' \ --header 'Authorization: Bearer ************' ``` ### Response #### Success Response (200) - **locations** (array) - A list of fuel station location objects. - **address** (object) - The address details of the location. - **street** (string) - The street name. - **houseNumber** (string) - The house number. - **postalCode** (string) - The postal code. - **city** (string) - The city name. - **country** (string) - The country name. - **coordinates** (object) - The geographical coordinates of the location. - **latitude** (number) - The latitude. - **longitude** (number) - The longitude. - **name** (string) - The name of the location. - **type** (string) - The type of the location (e.g., 'FUEL'). #### Response Example ```json { "locations": [ { "address": { "street": "Example Street", "houseNumber": "123", "postalCode": "SW1A 0AA", "city": "London", "country": "GB" }, "coordinates": { "latitude": 51.5074, "longitude": -0.1278 }, "name": "Example Station", "type": "FUEL" } ] } ``` ``` -------------------------------- ### Pagination Example for Transactions API Source: https://developer.shell.com/api-catalog/loyalty-transactions/quick-start-guide-1 Demonstrates how to use 'page' and 'pageSize' query parameters to paginate through transaction results. Maintain a consistent 'pageSize' for sequential record retrieval. ```url https://api-test.shell.com/loyalty/v1/consumers/transactionsL?page=1&pageSize=20 ``` -------------------------------- ### 2. Request User Permissions Source: https://developer.shell.com/api-catalog/loyalty-assign-offer/quick-start-guide This step requires the user to sign into their Shell GO+ account. Your application will redirect the user to the Shell login page with specific query parameters. After successful sign-in, the user is redirected back to your application with an access code. ```APIDOC ## Request User Permissions ### Description To act on behalf of the user, redirect them to the Shell login page. After they sign in, they will be redirected back to your application with an access code. ### Method GET (Redirection) ### Endpoint `https://test.login.consumer.shell.com/?market=&partner=true&clientId=&redirect=` ### Query Parameters - `market` (string) - Required - Combination of language code (lower case) and country code (upper case), separated by a hyphen (e.g., `en-BG`). - `clientId` (string) - Required - Unique Shell client ID of the partner. - `partner` (string) - Optional - Set to `true` (default for any customer). - `redirect` (string) - Required - Your application redirect URL. This URL must be whitelisted by Shell and should include a unique ID for session tracking (e.g., `test.shell.com/session=1452923773`). ### Redirected URL Example (after user sign-in) `https://?accessCode=****************` **Note:** The `accessCode` is only valid for 30 seconds. ``` -------------------------------- ### Start EV Charge Session Response Source: https://developer.shell.com/api-catalog/b2b-ev-charge-sessions/quick-start-guide A successful request to start an EV charge session will return a JSON object containing the unique sessionId. ```json { "sessionId": "2f0c91f5-9b17-481f-9a71-ce1d9d188998" } ``` -------------------------------- ### Get Basic Public Token Source: https://developer.shell.com/api-catalog/loyalty-points-balance/quick-start-guide-1 Use a POST request to get a basic public token from the Shell Identity API. The body of the request must contain your SH256-encrypted Client ID. ```APIDOC ## Get Basic Public Token ### Description Use a POST request to get a basic public token from the Shell Identity API. The body of the request must contain your SH256-encrypted Client ID. ### Method POST ### Endpoint https://test.id.consumer.shell.com/api/v2/auth/token ### Headers - Content-Type: application/json ### Request Body - digest (string) - Required - Your Client ID, encrypted using the SHA256 algorithm. ### Request Example ```bash curl --location --request POST 'https://test.id.consumer.shell.com/api/v2/auth/token' \ --header 'Content-Type: application/json' \ --data-raw '{ "digest": "******************" }' ``` ### Response #### Success Response (200) - token (string) - The basic public token. - tokenType (string) - The type of token. - expiresIn (string) - The expiration time of the token. - owner (string) - The owner of the token. #### Response Example ```json { "token": "**********", "tokenType": "Basic", "expiresIn": "unlimited", "owner": "partner_1" } ``` ``` -------------------------------- ### Sample Response for Shop Opening Hours Source: https://developer.shell.com/zh-hans/api-catalog/b2b-mobility-sites/quick-start-guide This JSON structure represents a sample response for shop opening hours, detailing daily schedules. ```json [ { "days": [ "Mon", "Tue", "Wed", "Thu", "Fri" ], "hours": [ [ "06:00", "22:00" ] ] }, { "days": [ "Sat" ], "hours": [ [ "07:00", "22:00" ] ] }, { "days": [ "Sun" ], "hours": [ [ "08:00", "22:00" ] ] } ], "shop_opening_hours": [] } ``` -------------------------------- ### Download Document API Request Body Example Source: https://developer.shell.com/api-catalog/lubricants-order-management/quick-start-guide-0 This example shows the JSON body structure for the Download Document API. It requires specifying the mode of download, delivery and billing document IDs, sales organization, and sold-to party number. ```json { "mode": "download", "deliveryDoc": [ "0714647478_005056B27E581EDBA6A51B1BEBEED903" ], "billingDoc": [ "9494560128_ZL2", "3118527663_ZF2" ], "salesOrg": "DE01", "soldTo": "0012253174" } ``` -------------------------------- ### Initialize Shell EV API Client for OAuth 2.0 Source: https://developer.shell.com/product-catalog/shell-ev/sdk This snippet demonstrates initializing the API client with OAuth 2.0 Client Credentials Grant. It automatically handles token fetching and refreshing when endpoints requiring this authentication are called. ```csharp ShellEVClient client = new ShellEVClient.Builder() .ClientCredentialsAuth( new ClientCredentialsAuthModel.Builder( "OAuthClientId", "OAuthClientSecret" ) .Build()) .Build(); ``` -------------------------------- ### Start EV Charge Session (CURL) Source: https://developer.shell.com/api-catalog/b2b-ev-charge-sessions/quick-start-guide Use this request to start an EV charging session. Ensure you include the correct client ID, client secret, and authorization token in the headers, along with the charge session details in the request body. ```curl curl --location --request POST 'https://api01-uat.shell.com/mobility-ev-api/v1/api/charge-sessions/start' \ --header 'client_id: ************' \ --header 'client_secret: ***********' \ --header 'Authorization: Bearer ********* --header 'Content-Type: application/json' \ --data-raw '{ "evChargeNumber": "NL-TNM-216599-X", "evseId": "NL*TNM*EVIRTUALCP0002*0" }' ```