# Apex callouts, Named Credentials and Apex REST

*Platform Developer II Study Guide · Process Automation, Logic, and Integration · Last updated October 16, 2026 · https://www.certifyforce.com/study-guide/platform-developer-ii/process-automation-logic-and-integration/apex-callouts-named-credentials-and-apex-rest*

Outbound callout rules (uncommitted work, triggers, 100 callouts, 120 seconds), named credentials with external credentials, WSDL2Apex for SOAP, inbound Apex REST and SOAP web services, and the Composite resource for all-or-none multi-step requests.

- Certification: Salesforce Platform Developer II
- Exam section: Process Automation, Logic, and Integration
- Study guide: https://www.certifyforce.com/study-guide/platform-developer-ii

**Official exam objective:**

> Given a scenario, apply the programmatic integration techniques and platform features for inbound and outbound communication.

## What the exam expects

- Find why an outbound callout fails: uncommitted work, a trigger context, the callout count or cumulative timeout.
- Configure callout endpoints with a named credential and external credential instead of URLs and secrets in code.
- Choose between HTTP classes and WSDL2Apex for outbound calls, and between Apex REST and Apex SOAP for inbound calls.
- Write an Apex REST class that binds JSON parameters, reads `RestContext.request` and sets status codes.
- Use the REST API Composite resource when an external system needs several dependent operations rolled back together without custom Apex.

Key terms: **callout** (Apex calling an external HTTP or SOAP service), **named credential** (endpoint URL plus authentication in one definition, referenced as `callout:Name`), **external credential** (the authentication settings a named credential uses), **Apex REST** (a global `@RestResource` class exposed under `/services/apexrest/`), **Composite resource** (a REST API call that runs dependent subrequests).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Pending work | No callout while DML, async Apex, scheduled Apex or email is pending in the transaction (rolling back the DML and releasing savepoints clears it) | [Callout Limits and Limitations](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_timeouts.htm) |
| Callouts per transaction | 100; cumulative timeout 120 seconds | [Callout Limits and Limitations](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_timeouts.htm) |
| Callout timeout | Default 10 seconds; maximum 120,000 ms | [Callout Limits and Limitations](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_timeouts.htm) |
| Trigger callouts | Must be asynchronous | [Triggers](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers.htm) |
| Named credential endpoint | `callout:Name/path`; no Remote Site Setting | [Named Credentials as Callout Endpoints](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_named_credentials.htm) |
| Legacy named credentials | No longer updated; use named plus external credentials | [Named Credentials](https://help.salesforce.com/s/articleView?id=xcloud.named_credentials_about.htm&type=5) |
| WSDL2Apex | Stub, type and Async classes | [SOAP Services: Defining a Class from a WSDL Document](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_wsdl2apex.htm) |
| @RestResource class | Must be global; mapping is case-sensitive | [RestResource Annotation](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_rest_resource.htm) |
| @HttpGet / @HttpDelete | No parameters allowed | [Apex REST Methods](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_rest_methods.htm) |
| JSON parameter binding | By name; order doesn't matter | [Apex REST Methods](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_rest_methods.htm) |
| Void REST method | Sends `RestResponse.responseBody` | [RestResponse Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_restresponse.htm) |
| Composite allOrNone | true rolls back the entire request | [Composite Request Body](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/requests_composite.htm) |

## Check yourself

- Why must a trigger hand its callout to async Apex?
- When is a Remote Site Setting unnecessary for a callout?
- How does a client pass input to an `@HttpGet` Apex REST method?
- Why choose Composite over Composite Batch for dependent record creation?

## Sources

- [Invoking Callouts Using Apex](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts.htm)
- [Callout Limits and Limitations](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_timeouts.htm)
- [Named Credentials as Callout Endpoints](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_named_credentials.htm)
- [Named Credentials](https://help.salesforce.com/s/articleView?id=xcloud.named_credentials_about.htm&type=5)
- [Triggers](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers.htm)
- [Queueable Apex](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_queueing_jobs.htm)
- [Execution Governors and Limits](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm)
- [SOAP Services: Defining a Class from a WSDL Document](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_wsdl2apex.htm)
- [Transaction Control](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_transaction_control.htm)
- [Invoking HTTP Callouts](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_http.htm)
- [Introduction to Apex REST](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_rest_intro.htm)
- [RestResource Annotation](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_rest_resource.htm)
- [Apex REST Methods](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_rest_methods.htm)
- [RestResponse Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_restresponse.htm)
- [RestRequest Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_restrequest.htm)
- [Webservice Methods](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_web_services_methods.htm)
- [Composite Request Body](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/requests_composite.htm)
- [Composite](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_composite_composite_post.htm)
- [Composite Batch](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_composite_batch.htm)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 10 linked practice questions, and unlimited timed mock exams are included with the Platform Developer II pack (USD $19): https://www.certifyforce.com/practice-exams
