{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"How to Upgrade","siteUrl":"https://docs.peachfinance.com","description":"API and product documentation for Peach Finance, a lending-as-a-service platform.","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"how-to-upgrade","__idx":0},"children":["How to Upgrade"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"determine-which-version-youre-using","__idx":1},"children":["Determine which version you're using"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["First determine which API version your application is using."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All requests made to the Peach API have an implicit or explicit version associated with them."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"api-keys","__idx":2},"children":["API Keys"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["It's highly likely that your application is built using a Peach API Key. Each Peach API Key has an API Version associated with it. ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/developer-tools/api-keys"},"children":["Learn about API Keys"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Determine which API Key your application is using by finding it in your codebase or secrets manager."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can then determine which API Version your key is using by either fetching from the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/api/keys"]}," endpoint or referencing the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Peach-Version"]}," response header."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"check-the-apikeys-endpoint","__idx":3},"children":["Check the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/api/keys"]}," endpoint"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Fetch the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["http://api.peach.finance/api/keys"]}," endpoint. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-docs/api-public/api-keys/"},"children":["API Key endpoints docs"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Match the last four alphanumerics of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["key"]}," field to the last four of your API key."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Check the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["apiVersion"]}," field to see the API version for that key. e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"2023-11-29\""]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"check-the-peach-version-header","__idx":4},"children":["Check the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Peach-Version"]}," header"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Fetch ANY peach endpoint with your API key."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Examine the response header named ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Peach-Version:"]},". It should have a value like ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"2023-11-29\""]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An example command that will only display the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Peach-Version"]}," header would be:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# Example—Be sure to set your API Key in place of the example `123ab...89def`.\n> curl -H \"X-API-KEY: 123ab...89def\" -s -D - -o /dev/null  https://api.peach.finance/api/loans | grep -i 'peach-version'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["...which would result in something like ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["peach-version: 2023-11-29"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"hardcoded-api-version","__idx":5},"children":["Hardcoded API Version"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["It's also possible your application is hardcoding the API Version as well. Check if your application has set the request header ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["peach-version"]}," to a value."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"determine-if-your-application-uses-api-versioned-endpoints","__idx":6},"children":["Determine if your application uses API Versioned endpoints"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Only certain endpoints in Peach are under API Versioning. Check to see if your application uses these endpoints."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Go to the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/developer-tools/breaking-changes"},"children":["Breaking Changes"]}," page to see the endpoints currently affected by breaking changes."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Check your application to see if you make requests to any of these endpoints. You should be able to tell by inspecting your code base."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you're not making use of any of these endpoints then you shouldn't need to make changes to your application."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"determine-if-theyve-changed-since-your-last-upgrade","__idx":7},"children":["Determine if they've changed since your last upgrade"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If there's an endpoint you're using, then check if it's in a newer version than your current version."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You need to compare your current API version which you determined in the steps above to the API versions on the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/developer-tools/breaking-changes"},"children":["Breaking Changes"]}," page. If the breaking changes are all in your current version or earlier, then you shouldn't need to make changes to your application."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If the breaking changes are in versions newer than your current API Version, then you will need to change your application."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"change-your-application","__idx":8},"children":["Change your application"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If your codebase makes use of endpoints affected by API Versioning, then you may need to change your application to match these changes."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The specific changes you need to make will be dependent on the nature of the breaking changes."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/developer-tools/breaking-changes"},"children":["Breaking Changes"]}," page to see the changes. The upgrade procedure should be explained there. If you need additional help contact support@peachfinance.com."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"test-the-changes-in-sandbox","__idx":9},"children":["Test the changes in sandbox"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You should first test your changes in your Sandbox environment."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Make the changes to your application which points at your sandbox environment (i.e., using the domain ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sandboxapi.peach.finance"]},"). Then upgrade the API key you're using in your Sandbox environment. See \"Upgrading an API key's API version\" in the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/developer-tools/api-keys"},"children":["API Keys Doc"]}," for details."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Confirm the endpoints work with the new changes by ensuring the application runs against those endpoints. Monitor your logs or other systems to confirm the system behaves as expected."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"roll-out-the-changes-to-prod","__idx":10},"children":["Roll out the changes to prod"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once you've confirmed the changes to your application function in sandbox with the upgraded API Version, you should upgrade your production application codebase and the update associated API Key."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"next-steps","__idx":11},"children":["Next steps"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/developer-tools/breaking-changes"},"children":["Breaking Changes"]}]}," — The list of breaking changes you may need to account for."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/developer-tools/api-versioning"},"children":["API Versioning"]}]}," — Background on Peach's approach to versioning."]}]}]},"headings":[{"value":"How to Upgrade","id":"how-to-upgrade","depth":1},{"value":"Determine which version you're using","id":"determine-which-version-youre-using","depth":2},{"value":"API Keys","id":"api-keys","depth":3},{"value":"Check the /api/keys endpoint","id":"check-the-apikeys-endpoint","depth":3},{"value":"Check the Peach-Version header","id":"check-the-peach-version-header","depth":3},{"value":"Hardcoded API Version","id":"hardcoded-api-version","depth":3},{"value":"Determine if your application uses API Versioned endpoints","id":"determine-if-your-application-uses-api-versioned-endpoints","depth":2},{"value":"Determine if they've changed since your last upgrade","id":"determine-if-theyve-changed-since-your-last-upgrade","depth":3},{"value":"Change your application","id":"change-your-application","depth":2},{"value":"Test the changes in sandbox","id":"test-the-changes-in-sandbox","depth":2},{"value":"Roll out the changes to prod","id":"roll-out-the-changes-to-prod","depth":2},{"value":"Next steps","id":"next-steps","depth":2}],"frontmatter":{"seo":{"title":"How to Upgrade"}},"lastModified":"2026-05-01T14:33:55.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/developer-tools/how-to-upgrade","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}