Introduction

These are supplementary code examples for the public API to pull information on all registered Copper Alloys - brought to you by the Copper Development Association (CDA). Please contact CDA via email to receive a developer username and password in order to use, and/or create apps, based off of data from the Copper Alloys API.

Best Practices

The Copper Alloys API (API) uses extensive use of HTTP headers such as Etag, Date and Last-Modified so please use cached responses when calling any method. The token retrieved from the Authentication method /auth/token should be valid for around 20 hours. There is no need to retreive a new token for subsequent or chained API calls.

CORS is enabled on the API site so developers do not require JSON-P calls when using Javascript.

Live Examples of Sites using the CDA Copper Alloys API

The following sites are examples of how the Copper Alloys API can be utilized:

Terms of Service and License

Read the Terms of Service and the License.

API Code Examples

Documentation: https://apidocs.copper.org/#/Authentication/get_auth_token

Token Method Code Examples

Javascript

              
            

PHP

              
            

Shell CLI w/Curl

              
            

Documentation: https://apidocs.copper.org/#/Alloys_Listings/getAlloysXHTML2

List of Alloys Code Examples

Make sure to get a token from the auth/token examples above first.

Javascript

                
              

PHP

                
              

Shell CLI w/Curl

                
              

Documentation: https://apidocs.copper.org/#/Alloys_Listings/getAlloysJSON

List of Alloys Code Examples

Make sure to get a token from the auth/token examples above first.

Javascript

                
              

PHP

                
              

Shell CLI w/Curl + python

                
              

Documentation: https://apidocs.copper.org/#/Individual_Alloy_Calls/get_alloys_xhtml__alloyID_

Individual Alloy Code Examples

Make sure to get a token from the auth/token examples above first.

Javascript

                
              

PHP

                
              

Shell CLI w/Curl

                
              

Documentation: https://apidocs.copper.org/#/Alloys_Listings/getAlloysJSON

Individual Alloy Code Examples

Make sure to get a token from the auth/token examples above first.

Javascript

                
              

PHP

                
              

Shell CLI w/Curl + python

                
              

Documentation: https://apidocs.copper.org/#/Multiple_Alloy_Calls/get_alloys__alloyID___alloyID2_1

Multiple Alloy Code Examples

Make sure to get a token from the auth/token examples above first.

Javascript

                
              

PHP

                
              

Shell CLI w/Curl

                
              

Documentation: https://apidocs.copper.org/#/Multiple_Alloy_Calls/get_alloys_json__alloyID___alloyID2_1

Multiple Alloy Code Examples

Make sure to get a token from the auth/token examples above first.

Javascript

                
              

PHP

                
              

Shell CLI w/Curl + python

                
              

Documentation: https://apidocs.copper.org/#/Suppliers_Listings/get_suppliers_

List of Suppliers Code Examples

Make sure to get a token from the auth/token examples above first.

Javascript

                
              

PHP

                
              

Shell CLI w/Curl

                
              

Documentation: https://apidocs.copper.org/#/Suppliers_Listings/get_suppliers_json_

List of Suppliers Code Examples

Make sure to get a token from the auth/token examples above first.

Javascript

                
              

PHP

                
              

Shell CLI w/Curl + python

                
              

Documentation: https://apidocs.copper.org/#/Forms_Listings/get_forms_

List of Forms Code Examples

Make sure to get a token from the auth/token examples above first.

Javascript

                
              

PHP

                
              

Shell CLI w/Curl

                
              

Documentation: https://apidocs.copper.org/#/Forms_Listings/get_forms_json_

List of Forms Code Examples

Make sure to get a token from the auth/token examples above first.

Javascript

                
              

PHP

                
              

Shell CLI w/Curl + python

                
              

Documentation: https://apidocs.copper.org/#/Forms_Listings/get_forms__formName_

Individual Form Code Examples

Make sure to get a token from the auth/token examples above first.

Javascript

                
              

PHP

                
              

Shell CLI w/Curl

                
              

Documentation: https://apidocs.copper.org/#/Forms_Listings/get_forms_json__formName_

Individual Form Code Examples

Make sure to get a token from the auth/token examples above first.

Javascript

                
              

PHP

                
              

Shell CLI w/Curl + python

                
              

Documentation: https://apidocs.copper.org/#/Forms_Listings/get_forms__formName___formName2_

Multiple forms Code Examples

Make sure to get a token from the auth/token examples above first.

Javascript

                
              

PHP

                
              

Shell CLI w/Curl

                
              

Documentation: https://apidocs.copper.org/#/Forms_Listings/get_forms_json__formName___formName2_

Multiple forms Code Examples

Make sure to get a token from the auth/token examples above first.

Javascript

                
              

PHP

                
              

Shell CLI w/Curl + Python

                
              

Download Code Examples:

Download all code examples Download Javascript Download PHP Download CLI