Please clarify which API call combination you're having a problem with. I'm not certain I am quite following.
If you need one file with the key and cert chain together you can use:
GET https://certwarden.example.com/certwarden/api/v1/download/privatecertchains/[Name]
The name here is the certificate name. The application should return the correct key automatically with this call.
If you need a separate key file and chain file, you would use:
GET https://certwarden.example.com/certwarden/api/v1/download/privatekeys/[Name]
and
GET https://certwarden.example.com/certwarden/api/v1/download/certificates/[Name]
In this case, you would need to manually ensure the key you are downloading matches the certificate you are downloading.